Skip to main content

find_link_conflict

Function find_link_conflict 

Source
pub async fn find_link_conflict(
    conn: &mut PgConnection,
    student_number: &str,
    sisu_person_id: &str,
    user_id: Uuid,
) -> ModelResult<Option<LinkConflict>>
Expand description

Checks both unique keys before linking: a student who changed programme keeps their Sisu person id and gets a new number, so checking the number alone lets the link through and then trips uq_verified_student_numbers_person as a bare 500. Another account’s hold wins over our own.