dereference annotation

This commit is contained in:
j 2018-11-13 12:06:24 +00:00
parent 6b96c9b3ee
commit bb563c1d82
1 changed files with 6 additions and 0 deletions

View File

@ -118,6 +118,12 @@ def editClip(request, data):
clip.item = clip.annotation.item
clip.annotation = None
setattr(clip, {'in': 'start', 'out': 'end'}.get(key), float(data[key]))
if 'annotation' in data and not data['annotation']:
if clip.annotation:
clip.start = clip.annotation.start
clip.end = clip.annotation.end
clip.item = clip.annotation.item
clip.annotation = None
if 'volume' in data:
clip.volume = float(data['volume'])
if not clip.annotation: