Skip to content

Commit

Permalink
Fix task_edit.py when there is not yet subproblems in a task
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDerval committed Mar 25, 2015
1 parent f0104db commit 36ecb2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/pages/course_admin/task_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def GET(self, courseid, taskid):
available_filetypes = get_available_task_file_managers().keys()

# custom problem-type:
for pid in task_data["problems"]:
for pid in task_data.get("problems", {}):
problem = task_data["problems"][pid]
if (problem["type"] == "code" and "boxes" in problem) or problem["type"] not in ("code", "code-single-line", "code-file", "match", "multiple-choice"):
problem_copy = copy.deepcopy(problem)
Expand Down

0 comments on commit 36ecb2b

Please sign in to comment.