only update ids if needed

This commit is contained in:
j 2012-10-10 13:36:01 +02:00
parent 37ee7a1267
commit 451577a3f9

View file

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