mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-26 20:06:17 +02:00
rename read_only_variables to readonly_variables
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user