Skip to content

Commit ac5a6f1

Browse files
foobrichet
foo
authored andcommitted
Check if feedback path exists before set it relative
1 parent d888917 commit ac5a6f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nbgrader/server_extensions/assignment_list/handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ def list_submitted_assignments(self, course_id=None):
149149
else:
150150
for assignment in assignments:
151151
for submission in assignment["submissions"]:
152-
if 'local_feedback_path' in submission.keys() and \
153-
os.path.exists(submission['local_feedback_path']):
152+
if submission['local_feedback_path'] \
153+
and os.path.exists(submission['local_feedback_path']):
154154
submission['local_feedback_path'] = \
155155
os.path.relpath(submission['local_feedback_path'],
156156
self._root_dir)

0 commit comments

Comments
 (0)