Skip to content

Commit

Permalink
Make marking completions as registered not to crash if a completion h…
Browse files Browse the repository at this point in the history
…as been deleted before the marking has succeeded
  • Loading branch information
nygrenh committed Jan 30, 2025
1 parent 660bdf4 commit ac44676
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ WHERE id = $1
Ok(res)
}

/// Also returns soft deleted completions so that we can make sure the process does not crash if a completion is deleted before we get it back from the study registry.
pub async fn get_by_ids(
conn: &mut PgConnection,
ids: &[Uuid],
Expand All @@ -168,7 +169,6 @@ pub async fn get_by_ids(
SELECT *
FROM course_module_completions
WHERE id = ANY($1)
AND deleted_at IS NULL
",
ids,
)
Expand Down

0 comments on commit ac44676

Please sign in to comment.