reset string values

This commit is contained in:
j 2016-11-18 14:13:43 +02:00
parent ef075ffb78
commit 6970cbd08e

View file

@ -122,7 +122,7 @@ class Imdb(models.Model):
if isinstance(value, str): if isinstance(value, str):
value = normalize_value(value) value = normalize_value(value)
setattr(self, key, value) setattr(self, key, value)
else: elif isinstance(getattr(self, key), str):
setattr(self, key, '') setattr(self, key, '')
if self.season and self.season < 0: if self.season and self.season < 0:
self.season = None self.season = None