store clip values in clip db, cleanup if all annotations are gone, add additionalSort

This commit is contained in:
j 2012-01-20 23:23:21 +05:30
commit 16cc495fb5
10 changed files with 109 additions and 99 deletions

View file

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