Fix array index out of bounds.
This commit is contained in:
@@ -1259,6 +1259,7 @@ def replace_exercise_if_exists(all_exams, current_exercise, current_exam, seen_k
|
||||
|
||||
for exam in all_exams:
|
||||
exam_dict = exam.to_dict()
|
||||
if len(exam_dict.get("parts", [])) > 0:
|
||||
exercise_dict = exam_dict.get("parts", [])[0]
|
||||
if len(exercise_dict.get("exercises", [])) > 0:
|
||||
if any(
|
||||
|
||||
Reference in New Issue
Block a user