Skip to content

Commit

Permalink
Fix setting an imdb_id from None or ''. (#10669)
Browse files Browse the repository at this point in the history
  • Loading branch information
p0psicles authored May 25, 2022
1 parent 7a3599e commit 2061388
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions medusa/indexers/imdb/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def imdb_id(self):
@imdb_id.setter
def imdb_id(self, value):
"""Set imdb id."""
if value is None or value == '':
self._imdb_id = self.series_id = None
return

if isinstance(value, string_types) and 'tt' in value:
self._imdb_id = self._clean(value)
self.series_id = int(self._imdb_id.split('tt')[-1])
Expand Down

0 comments on commit 2061388

Please sign in to comment.