validate in/out values of edit clips
This commit is contained in:
parent
f94f25d7c7
commit
2473dfd231
2 changed files with 18 additions and 3 deletions
|
|
@ -65,6 +65,11 @@ class Edit(models.Model):
|
|||
clip.index = 0
|
||||
else:
|
||||
clip.index +=1
|
||||
# dont add clip if in/out are invalid
|
||||
if not clip.annotation:
|
||||
duration = clip.item.sort.duration
|
||||
if clip.start >= clip.end or clip.start >= duration or clip.end > duration:
|
||||
return False
|
||||
clip.save()
|
||||
return clip
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue