From be5b7474e0a6cd3da213ffae231a3c963122dba5 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 28 Feb 2013 16:07:19 +0530 Subject: [PATCH] dont store invalid entries --- oxdata/movie/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/oxdata/movie/models.py b/oxdata/movie/models.py index 4326126..a7525e4 100644 --- a/oxdata/movie/models.py +++ b/oxdata/movie/models.py @@ -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',