Compare commits

..

No commits in common. "8e5661b2f357f517ec78a631a26d576b4f504bcd" and "5dcd7bc74517651b2080fd0395e19200ab31bbe3" have entirely different histories.

View File

@ -989,16 +989,12 @@ pub struct UserWithRolesAndMembershipPdf {
impl UserWithRolesAndMembershipPdf { impl UserWithRolesAndMembershipPdf {
pub(crate) async fn from_user(db: &SqlitePool, user: User) -> Self { pub(crate) async fn from_user(db: &SqlitePool, user: User) -> Self {
let membership_pdf = let membership_pdf: bool =
match sqlx::query_scalar!("SELECT membership_pdf FROM user WHERE id = ?", user.id) sqlx::query_scalar!("SELECT membership_pdf FROM user WHERE id = ?", user.id)
.fetch_one(db) .fetch_one(db)
.await .await
.unwrap() .unwrap()
{ .is_some();
Some(a) if a.is_empty() => false,
None => false,
_ => true,
};
Self { Self {
roles: user.roles(db).await, roles: user.roles(db).await,