refactor: make settings a fixture

This commit is contained in:
Vlad Stan
2024-10-17 10:39:57 +02:00
committed by dni ⚡
parent b33abddf3a
commit 7bad0552f6
7 changed files with 96 additions and 90 deletions
-3
View File
@@ -840,9 +840,6 @@ async def create_user_account(
account: Optional[Account] = None, wallet_name: Optional[str] = None
) -> User:
if not settings.new_accounts_allowed:
print("### self.lnbits_allow_new_accounts", settings.lnbits_allow_new_accounts)
print("### self.lnbits_allowed_users", settings.lnbits_allowed_users)
raise ValueError("Account creation is disabled.")
if account:
if account.username and await get_account_by_username(account.username):