only update ids if needed

This commit is contained in:
j 2012-10-10 13:36:01 +02:00
parent 37ee7a1267
commit 451577a3f9
1 changed files with 2 additions and 1 deletions

View File

@ -340,7 +340,8 @@ class Item(models.Model):
q = Item.objects.filter(oxdbId=oxdbId).exclude(id=self.id)
self.oxdbId = oxdbId
update_poster = True
update_ids = True
if len(self.itemId) != 7:
update_ids = True
#id changed, what about existing item with new id?
if settings.USE_IMDB and len(self.itemId) != 7 and self.oxdbId != self.itemId: