pub async fn write_settings(
conn: &mut PgConnection,
app_config: &ApplicationConfiguration,
settings: &CourseSettingsSnapshot,
live: &CourseSettingsSnapshot,
can_change_chatbot: bool,
embeddings: &TextEmbeddings,
) -> ModelResult<Course>Expand description
Writes the course settings of the snapshot without recording history: the course row in one
write, and the audiences that differ from live, the current settings. Embeddings of the
changed name, description and audiences come from embeddings where it has them. Errors with
PreconditionFailed if the snapshot is of another course, or if it changes can_add_chatbot
and can_change_chatbot is false.