.
This commit is contained in:
+6
-3
@@ -1160,10 +1160,13 @@ def question_save_annotation(request, pk):
|
||||
|
||||
question_images = question.images.all()
|
||||
|
||||
for n, annotation in enumerate(image_annotations):
|
||||
for n, image in enumerate(question_images):
|
||||
annotation = image_annotations[n]
|
||||
if annotation != "undefined":
|
||||
question_images[n].image_annotations = annotation
|
||||
question_images[n].save()
|
||||
image.image_annotations = annotation
|
||||
else:
|
||||
image.image_annotations = ""
|
||||
image.save()
|
||||
|
||||
data = {"status": "success"}
|
||||
return JsonResponse(data, status=200)
|
||||
|
||||
Reference in New Issue
Block a user