X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/9d6c41a8d4518ba851c9de7426abe49de0660077..08a2751c9ce92238652544612990c5246fbc5037:/wtem/forms.py?ds=inline diff --git a/wtem/forms.py b/wtem/forms.py index a434854..08a1e19 100644 --- a/wtem/forms.py +++ b/wtem/forms.py @@ -61,6 +61,8 @@ class WTEMSingleForm(forms.ModelForm): if exercise_id != str(exercise['id']): raise ValueError('wrong exercise id') for answer in posted_answers.values(): + if not answer.get('closed_part', True): + raise ValueError('no answer') answers[exercise_id] = answer submission.answers = json.dumps(answers) submission.save()