mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-19 03:57:29 +02:00
remove unused comment, and drop readonly settings on update
This commit is contained in:
@@ -46,6 +46,8 @@ async def update_admin_settings(data: UpdateSettings):
|
||||
def get_q_and_values(data):
|
||||
keys = []
|
||||
values = []
|
||||
data.pop("lnbits_allowed_funding_sources")
|
||||
data.pop("super_user")
|
||||
for key, value in data.items():
|
||||
setattr(settings, key, value)
|
||||
keys.append(f"{key} = ?")
|
||||
|
@@ -210,13 +210,9 @@ async def check_admin_settings():
|
||||
get_admin_settings,
|
||||
)
|
||||
|
||||
# ext_db = importlib.import_module(f"lnbits.extensions.admin").db
|
||||
# async with ext_db.connect() as db:
|
||||
# row = await db.fetchone("SELECT * FROM admin.settings")
|
||||
|
||||
sets = await get_admin_settings()
|
||||
# create new settings if table is empty
|
||||
if not sets:
|
||||
# create new settings if table is empty
|
||||
logger.warning(
|
||||
"admin.settings empty. inserting new settings and creating admin account"
|
||||
)
|
||||
|
Reference in New Issue
Block a user