Skip to content

Commit

Permalink
Small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Maija Y committed Jan 22, 2025
1 parent 104f8d7 commit cee95ee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ async fn post_flag_answer_in_peer_review(
let insert_result =
exercise_slide_submissions::insert_flagged_answer(&mut conn, new_flagged_answer).await;

if let Err(_) = insert_result {
if insert_result.is_err() {
return Err(ControllerError::new(
ControllerErrorType::InternalServerError,
"Failed to report answer".to_string(),
Expand Down

0 comments on commit cee95ee

Please sign in to comment.