forked from 0x2620/pandora
store clip values in clip db, cleanup if all annotations are gone, add additionalSort
This commit is contained in:
parent
10a1239df7
commit
16cc495fb5
10 changed files with 109 additions and 99 deletions
|
|
@ -165,6 +165,8 @@ def removeAnnotation(request):
|
|||
a = get_object_or_404_json(models.Annotation, public_id=data['id'])
|
||||
if a.editable(request.user):
|
||||
a.delete()
|
||||
if a.clip.annotations.count() == 0:
|
||||
a.clip.delete()
|
||||
else:
|
||||
response = json_response(status=403, text='permission denied')
|
||||
return render_to_json_response(response)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue