File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ def parse_project_string(user_input):
290290 if (match .group ("asstype" ) and not match .group ("num" )
291291 and not match .group ("subtitle" )):
292292 subtitle = match .group ("asstype" )
293- return None , None , subtitle
293+ return "" , 0 , subtitle
294294
295295 # Convert assignment type abbreviations to canonical "Project", "Lab", etc.
296296 assignment_types = {
@@ -317,6 +317,9 @@ def parse_project_string(user_input):
317317 num = int (match .group ("num" ))
318318 subtitle = match .group ("subtitle" )
319319
320+ assert asstype is not None , f"Parse proj type failed: '{ user_input } '"
321+ assert num is not None , f"Parse proj num failed: '{ user_input } '"
322+ assert subtitle is not None , f"Parse proj subtitle failed: '{ user_input } '"
320323 return asstype , num , subtitle
321324
322325
@@ -587,6 +590,7 @@ def get_submission_smart(
587590
588591 # Get a group
589592 group = get_group_smart (group_arg , project_arg , course_arg , client )
593+
590594 # User provides "best"
591595 if submission_arg == "best" :
592596 return client .get (f"/api/groups/{ group ['pk' ]} /ultimate_submission/" )
You can’t perform that action at this time.
0 commit comments