flag invalid ids
This commit is contained in:
parent
396b86f061
commit
b5a040764e
1 changed files with 5 additions and 0 deletions
|
@ -52,6 +52,8 @@ class Imdb(models.Model):
|
||||||
episodeTitle = models.CharField(max_length=1000, blank=True, default='')
|
episodeTitle = models.CharField(max_length=1000, blank=True, default='')
|
||||||
episodeYear = models.CharField(max_length=4, blank=True, default='')
|
episodeYear = models.CharField(max_length=4, blank=True, default='')
|
||||||
episodeDirector = models.CharField(max_length=1000, blank=True, default='')
|
episodeDirector = models.CharField(max_length=1000, blank=True, default='')
|
||||||
|
|
||||||
|
invalid = models.BooleanField(default=False)
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return u"%s (%s)" % (self.title, self.imdb)
|
return u"%s (%s)" % (self.title, self.imdb)
|
||||||
|
@ -75,6 +77,9 @@ class Imdb(models.Model):
|
||||||
if self.episode < 0:
|
if self.episode < 0:
|
||||||
self.episode = None
|
self.episode = None
|
||||||
self.save()
|
self.save()
|
||||||
|
elif not self.invalid:
|
||||||
|
self.invalid = True
|
||||||
|
self.save()
|
||||||
|
|
||||||
def json(self):
|
def json(self):
|
||||||
j = {}
|
j = {}
|
||||||
|
|
Loading…
Reference in a new issue