pub async fn upsert(
conn: &mut PgConnection,
course_module_id: Uuid,
open_university_product_id: Option<&str>,
grade_scale_id: Option<&str>,
) -> ModelResult<CourseModuleSuotarConfiguration>Expand description
Writes the module’s Suotar configuration, creating the row if the module has none. The pause and config-check columns are left alone; their writers are separate.
Resurrects a soft-deleted row rather than inserting beside it: ON CONFLICT can only infer
against uq_course_module_suotar_configurations, which is keyed on course_module_id alone.