create clips for all annotations

This commit is contained in:
j 2014-11-17 16:56:30 +00:00
parent cffbde5f5c
commit 25d794e803
1 changed files with 2 additions and 6 deletions

View File

@ -158,12 +158,8 @@ class Annotation(models.Model):
self.sortvalue = None
self.languages = None
#no clip or update clip
if self.layer in settings.CONFIG.get('clipLayers', []):
if not self.clip or self.start != self.clip.start or self.end != self.clip.end:
self.clip, created = Clip.get_or_create(self.item, self.start, self.end)
elif self.clip:
self.clip = None
if not self.clip or self.start != self.clip.start or self.end != self.clip.end:
self.clip, created = Clip.get_or_create(self.item, self.start, self.end)
super(Annotation, self).save(*args, **kwargs)
if set_public_id: