Compare commits
No commits in common. "8e5661b2f357f517ec78a631a26d576b4f504bcd" and "5dcd7bc74517651b2080fd0395e19200ab31bbe3" have entirely different histories.
8e5661b2f3
...
5dcd7bc745
@ -989,16 +989,12 @@ pub struct UserWithRolesAndMembershipPdf {
|
||||
|
||||
impl UserWithRolesAndMembershipPdf {
|
||||
pub(crate) async fn from_user(db: &SqlitePool, user: User) -> Self {
|
||||
let membership_pdf =
|
||||
match sqlx::query_scalar!("SELECT membership_pdf FROM user WHERE id = ?", user.id)
|
||||
let membership_pdf: bool =
|
||||
sqlx::query_scalar!("SELECT membership_pdf FROM user WHERE id = ?", user.id)
|
||||
.fetch_one(db)
|
||||
.await
|
||||
.unwrap()
|
||||
{
|
||||
Some(a) if a.is_empty() => false,
|
||||
None => false,
|
||||
_ => true,
|
||||
};
|
||||
.is_some();
|
||||
|
||||
Self {
|
||||
roles: user.roles(db).await,
|
||||
|
Loading…
Reference in New Issue
Block a user