dont store invalid entries

This commit is contained in:
j 2013-02-28 16:07:19 +05:30
parent 7c58590103
commit be5b7474e0

View file

@ -83,7 +83,10 @@ class Imdb(models.Model):
def save(self, *args, **kwargs):
super(Imdb, self).save(*args, **kwargs)
Match.update_item(self)
if not self.invalid:
Match.update_item(self)
else:
Match.objects.filter(item=self).delete()
keys = ('title', 'director', 'year', 'season', 'episode',
'originalTitle',