forked from 0x2620/pandora
create clips for all annotations
This commit is contained in:
parent
cffbde5f5c
commit
25d794e803
1 changed files with 2 additions and 6 deletions
|
@ -158,12 +158,8 @@ class Annotation(models.Model):
|
||||||
self.sortvalue = None
|
self.sortvalue = None
|
||||||
self.languages = 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:
|
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)
|
self.clip, created = Clip.get_or_create(self.item, self.start, self.end)
|
||||||
elif self.clip:
|
|
||||||
self.clip = None
|
|
||||||
|
|
||||||
super(Annotation, self).save(*args, **kwargs)
|
super(Annotation, self).save(*args, **kwargs)
|
||||||
if set_public_id:
|
if set_public_id:
|
||||||
|
|
Loading…
Reference in a new issue