validate in/out values of edit clips

This commit is contained in:
j 2013-07-13 11:53:13 +00:00
commit 2473dfd231
2 changed files with 18 additions and 3 deletions

View file

@ -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