Commit 3691c3e 1 parent 62cc145 commit 3691c3e Copy full SHA for 3691c3e
File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -48,18 +48,20 @@ def admin_repos_delete(repo_id: str):
48
48
assert_course_context (assignment )
49
49
assert_course_context (student )
50
50
51
-
52
51
# If the repo is shared, then student can not delete
53
52
req_assert (not repo .shared , message = "Repo is shared. Please reach out to Anubis support to delete/reset this repo." )
54
53
54
+ # save this now, or get a database error after the delete operation
55
+ assignment_id = repo .assignment_id
56
+
55
57
# Delete the repo
56
58
delete_assignment_repo (student , assignment )
57
59
58
60
# Delete cache entry
59
61
cache .delete_memoized (get_repos , student .id )
60
62
61
63
# Clear cache entry
62
- cache .delete_memoized (get_assignment_data , student .id , repo . assignment_id )
64
+ cache .delete_memoized (get_assignment_data , student .id , assignment_id )
63
65
64
66
# Pass them back
65
67
return success_response ({"status" : "Github Repo & Submissions deleted" })
You can’t perform that action at this time.
0 commit comments