mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-10 17:26:15 +01:00
rename read_only_variables to readonly_variables
This commit is contained in:
parent
9b37c68b7c
commit
e49112d4ee
2 changed files with 5 additions and 5 deletions
|
@ -2,7 +2,7 @@ from typing import Optional
|
|||
|
||||
from lnbits.core.crud import create_payment
|
||||
from lnbits.helpers import urlsafe_short_hash
|
||||
from lnbits.settings import read_only_variables, settings
|
||||
from lnbits.settings import readonly_variables, settings
|
||||
from lnbits.tasks import internal_invoice_queue
|
||||
|
||||
from . import db
|
||||
|
@ -39,7 +39,7 @@ async def get_admin_settings() -> AdminSettings:
|
|||
async def update_admin_settings(data: UpdateSettings) -> Optional[AdminSettings]:
|
||||
fields = []
|
||||
for key, value in data.items():
|
||||
if not key in read_only_variables:
|
||||
if not key in readonly_variables:
|
||||
setattr(settings, key, value)
|
||||
if type(value) == list:
|
||||
joined = ",".join(value)
|
||||
|
|
|
@ -22,7 +22,7 @@ def list_parse_fallback(v):
|
|||
return []
|
||||
|
||||
|
||||
read_only_variables = [
|
||||
readonly_variables = [
|
||||
"host",
|
||||
"port",
|
||||
"debug",
|
||||
|
@ -220,7 +220,7 @@ async def check_admin_settings():
|
|||
from lnbits.extensions.admin.models import AdminSettings
|
||||
sets = AdminSettings(**row, lnbits_allowed_funding_sources=settings.lnbits_allowed_funding_sources)
|
||||
for key, value in sets.dict().items():
|
||||
if not key in read_only_variables:
|
||||
if not key in readonly_variables:
|
||||
try:
|
||||
setattr(settings, key, value)
|
||||
except:
|
||||
|
@ -269,7 +269,7 @@ async def create_admin_settings(db):
|
|||
keys = []
|
||||
values = ""
|
||||
for key, value in settings.dict(exclude_none=True).items():
|
||||
if not key in read_only_variables:
|
||||
if not key in readonly_variables:
|
||||
keys.append(key)
|
||||
if type(value) == list:
|
||||
joined = ",".join(value)
|
||||
|
|
Loading…
Add table
Reference in a new issue