only update annotations if public_id really changed
This commit is contained in:
parent
4ccebb882d
commit
80a242ee49
1 changed files with 4 additions and 2 deletions
|
@ -366,8 +366,10 @@ class Item(models.Model):
|
||||||
for c in self.clips.all(): c.save()
|
for c in self.clips.all(): c.save()
|
||||||
for a in self.annotations.all():
|
for a in self.annotations.all():
|
||||||
public_id = a.public_id.split('/')[1]
|
public_id = a.public_id.split('/')[1]
|
||||||
a.public_id = "%s/%s" % (self.itemId, public_id)
|
public_id = "%s/%s" % (self.itemId, public_id)
|
||||||
a.save()
|
if public_id != a.public_id:
|
||||||
|
a.public_id = public_id
|
||||||
|
a.save()
|
||||||
tasks.update_file_paths.delay(self.itemId)
|
tasks.update_file_paths.delay(self.itemId)
|
||||||
if update_poster:
|
if update_poster:
|
||||||
return tasks.update_poster.delay(self.itemId)
|
return tasks.update_poster.delay(self.itemId)
|
||||||
|
|
Loading…
Reference in a new issue