This commit is contained in:
Ross
2021-10-17 09:40:24 +01:00
parent e52fce8cc0
commit 9e9110c0c0
+1 -1
View File
@@ -122,7 +122,7 @@ def generic_exam_json_edit(request):
for i in question_ids: for i in question_ids:
# We get an integrity error if we try to add an object that already exists # We get an integrity error if we try to add an object that already exists
if not question_objects.filter(pk=i).exists(): if not exam.exam_questions.filter(pk=i).exists():
exam.exam_questions.add(i) exam.exam_questions.add(i)
#exam.exam_questions.add(question_objects) #exam.exam_questions.add(question_objects)
exam.save() exam.save()