allow-reservation-edits #424

Merged
philipp merged 21 commits from allow-reservation-edits into main 2024-04-23 23:23:13 +02:00
Showing only changes of commit 3c67e0deeb - Show all commits

View File

@ -990,8 +990,8 @@ pub struct UserWithRolesAndMembershipPdf {
impl UserWithRolesAndMembershipPdf {
pub(crate) async fn from_user(db: &SqlitePool, user: User) -> Self {
let membership_pdf: bool =
sqlx::query_scalar!("SELECT membership_pdf FROM user WHERE id = $1", user.id)
.fetch_optional(db)
sqlx::query_scalar!("SELECT membership_pdf FROM user WHERE id = ?", user.id)
.fetch_one(db)
.await
.unwrap()
.is_some();