addAnnotations: report which key is missing in error
This commit is contained in:
parent
729856eb30
commit
cdaa50c4d3
1 changed files with 3 additions and 2 deletions
|
@ -220,8 +220,9 @@ def addAnnotations(request, data):
|
||||||
'''
|
'''
|
||||||
for key in ('item', 'layer', 'annotations'):
|
for key in ('item', 'layer', 'annotations'):
|
||||||
if key not in data:
|
if key not in data:
|
||||||
return render_to_json_response(json_response(status=400,
|
return render_to_json_response(json_response(
|
||||||
text='invalid data'))
|
status=400,
|
||||||
|
text='invalid data (missing "{}")'.format(key)))
|
||||||
|
|
||||||
item = get_object_or_404_json(Item, public_id=data['item'])
|
item = get_object_or_404_json(Item, public_id=data['item'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue