pub async fn insert_enrollment_if_it_doesnt_exist(
conn: &mut PgConnection,
enrollment: NewCourseInstanceEnrollment,
) -> ModelResult<CourseInstanceEnrollment>Expand description
Inserts enrollment if it doesn’t exist yet, or restores a soft-deleted one.
Safe to call concurrently for the same enrollment, e.g. from multiple tabs or parallel requests.