Skip to main content

prepare_unsent_duplicate

Function prepare_unsent_duplicate 

Source
pub async fn prepare_unsent_duplicate(
    conn: &mut PgConnection,
    id: Uuid,
    weighed_grade: Option<&MappedGrade>,
) -> ModelResult<()>
Expand description

Readies a row that resolve-enrolments settles as duplicate without sending it, in the caller’s transaction and before the transition.

Drops the row’s claim on uq_credit_registrations_person_module, left from an earlier freeze, since the slot belongs to the credit the registry holds, and the frozen credits, which nothing registered. Keeps weighed_grade, the grade we would have sent, as the grade a later regrade of the completion has to beat.