Skip to main content

insert_global_email_template_if_absent

Function insert_global_email_template_if_absent 

Source
pub async fn insert_global_email_template_if_absent(
    conn: &mut PgConnection,
    email_template: EmailTemplateNew,
) -> ModelResult<Option<EmailTemplate>>
Expand description

Inserts a global template, or returns None if a live one of the same type and language exists. Unlike insert_email_template, never overwrites the existing row.