diff --git a/api/submission/remove_submission.go b/api/submission/remove_submission.go index f35c8cb0..aeacde3e 100644 --- a/api/submission/remove_submission.go +++ b/api/submission/remove_submission.go @@ -28,7 +28,6 @@ func HandleRemoveSubmission(request *RemoveSubmissionRequest) (*RemoveSubmission response.FoundUser = true; doesExist, err := db.RemoveSubmission(request.Assignment, request.TargetUser.Email, request.TargetSubmission); - if (err != nil) { return nil, core.NewInternalError("-418", &request.APIRequestCourseUserContext, "Failed to remove the submission."). Err(err).Add("user", request.TargetUser.Email).Add("submission", request.TargetSubmission); diff --git a/api/submission/remove_submission_test.go b/api/submission/remove_submission_test.go index 1924ce87..644338a4 100644 --- a/api/submission/remove_submission_test.go +++ b/api/submission/remove_submission_test.go @@ -44,7 +44,6 @@ func TestRemoveSubmission(test *testing.T) { // Roles below grader, other, recent. {model.RoleStudent, "student@test.com", "", false, false, true}, {model.RoleOther, "student@test.com", "", false, false, true}, - {model.RoleUnknown, "student@test.com", "", false, false, true}, // Roles above grader, other, recent {model.RoleAdmin, "student@test.com", "", true, true, false}, @@ -63,9 +62,6 @@ func TestRemoveSubmission(test *testing.T) { response := core.SendTestAPIRequestFull(test, core.NewEndpoint(`submission/remove`), fields, nil, testCase.role); if (!response.Success) { - if (testCase.role == model.RoleUnknown) { - continue; - } if (testCase.permError) { expectedLocator := "-306"; if (response.Locator != expectedLocator) { diff --git a/db/submission_test.go b/db/submission_test.go index f602d08b..2c0337c8 100644 --- a/db/submission_test.go +++ b/db/submission_test.go @@ -48,7 +48,6 @@ func (this *DBTests) DBTestRemoveSubmission(test *testing.T) { assignment := MustGetTestAssignment(); isRemoved, err := RemoveSubmission(assignment, testCase.targetEmail, testCase.targetSubmission); - if (err != nil) { test.Errorf("Case %d: Submission removal failed: '%v'.", i, err); continue;