fix admin default false

This commit is contained in:
Tiago vasconcelos 2022-02-10 16:44:47 +00:00
parent d1d62583c4
commit 4a35f84e95

View File

@ -57,12 +57,13 @@ async def get_user(user_id: str, conn: Optional[Connection] = None) -> Optional[
else:
return None
print("IS_ADMIN", user["id"] in [x.strip() for x in LNBITS_ADMIN_USERS] if LNBITS_ADMIN_USERS else False)
return User(
id=user["id"],
email=user["email"],
extensions=[e[0] for e in extensions],
wallets=[Wallet(**w) for w in wallets],
admin=LNBITS_ADMIN_USERS and user["id"] in [x.strip() for x in LNBITS_ADMIN_USERS]
admin=user["id"] in [x.strip() for x in LNBITS_ADMIN_USERS] if LNBITS_ADMIN_USERS else False
)