show notification to vorstand if boat entry with 'externes boot' or on multiple days is entered
This commit is contained in:
@ -370,6 +370,13 @@ ORDER BY last_access DESC
|
||||
}
|
||||
|
||||
pub async fn all_with_role(db: &SqlitePool, role: &Role) -> Vec<Self> {
|
||||
let mut tx = db.begin().await.unwrap();
|
||||
let ret = Self::all_with_role_tx(&mut tx, role).await;
|
||||
tx.commit().await.unwrap();
|
||||
ret
|
||||
}
|
||||
|
||||
pub async fn all_with_role_tx(db: &mut Transaction<'_, Sqlite>, role: &Role) -> Vec<Self> {
|
||||
sqlx::query_as!(
|
||||
Self,
|
||||
"
|
||||
@ -380,7 +387,7 @@ WHERE ur.role_id = ? AND deleted = 0
|
||||
ORDER BY name;
|
||||
", role.id
|
||||
)
|
||||
.fetch_all(db)
|
||||
.fetch_all(db.deref_mut())
|
||||
.await
|
||||
.unwrap()
|
||||
}
|
||||
|
Reference in New Issue
Block a user