backend: fix handling of invalid mcq justification

This commit is contained in:
nemunaire 2018-12-01 15:35:15 +01:00
parent d40922629b
commit 5f660702eb

View file

@ -88,8 +88,9 @@ func treatSubmission(pathname string, team fic.Team, exercice_id string) {
log.Println(id, "[ERR] We retrieve an invalid MCQ: from exercice", mcq.IdExercice, "whereas expected from exercice", exercice.Id)
return
} else if key, err := mcq.GetJustifiedFlag(exercice, choice); err != nil {
log.Println(id, "[ERR] Unable to retrieve mcq justification flag:", err)
return
// Most probably, we enter here because the selected choice has not to be justified
// So, just ignore this case as it will be invalidated by the mcq validation
continue
} else {
if responses.Keys == nil {
responses.Keys = map[int64]string{}