From 132d8a932097ba0b6d65fbc7c171172b28646081 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Tue, 9 May 2023 11:20:51 +0300 Subject: [PATCH] fix: rename bool `super_user` to `is_super_user` (#1690) --- lnbits/core/crud.py | 2 +- lnbits/core/templates/admin/index.html | 4 ++-- lnbits/settings.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lnbits/core/crud.py b/lnbits/core/crud.py index 379cf519..ae00a3f5 100644 --- a/lnbits/core/crud.py +++ b/lnbits/core/crud.py @@ -728,7 +728,7 @@ async def get_admin_settings(is_super_user: bool = False) -> Optional[AdminSetti row_dict = dict(sets) row_dict.pop("super_user") admin_settings = AdminSettings( - super_user=is_super_user, + is_super_user=is_super_user, lnbits_allowed_funding_sources=settings.lnbits_allowed_funding_sources, **row_dict, ) diff --git a/lnbits/core/templates/admin/index.html b/lnbits/core/templates/admin/index.html index 7f4746ac..1d0e3439 100644 --- a/lnbits/core/templates/admin/index.html +++ b/lnbits/core/templates/admin/index.html @@ -463,7 +463,7 @@ this.g.user.wallets[0].adminkey ) .then(response => { - this.isSuperUser = response.data.super_user || false + this.isSuperUser = response.data.is_super_user || false this.settings = response.data this.formData = _.clone(this.settings) this.updateFundingData() @@ -474,7 +474,7 @@ }, updateSettings() { let data = _.omit(this.formData, [ - 'super_user', + 'is_super_user', 'lnbits_allowed_funding_sources' ]) LNbits.api diff --git a/lnbits/settings.py b/lnbits/settings.py index fcbab629..a440fc51 100644 --- a/lnbits/settings.py +++ b/lnbits/settings.py @@ -310,7 +310,7 @@ class SuperSettings(EditableSettings): class AdminSettings(EditableSettings): - super_user: bool + is_super_user: bool lnbits_allowed_funding_sources: Optional[List[str]]