Compare commits
No commits in common. "79976b751fb510504f4ac5b350a4795c06143d93" and "ebdfe37bec8296f545c97feac39baf4749f44243" have entirely different histories.
79976b751f
...
ebdfe37bec
@ -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