mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Fix error with selects when trying to add a new settings in the database init_tables
This commit is contained in:
parent
1dd85364d4
commit
3e51cc78f0
1 changed files with 1 additions and 1 deletions
|
|
@ -431,6 +431,7 @@ class Database:
|
|||
}
|
||||
)
|
||||
db_setting = session.query(Settings).filter_by(id=setting).first()
|
||||
select_values = value.pop("select", [])
|
||||
|
||||
if db_setting:
|
||||
updates = {}
|
||||
|
|
@ -469,7 +470,6 @@ class Database:
|
|||
|
||||
db_selects = session.query(Selects).with_entities(Selects.value).filter_by(setting_id=value["id"]).all()
|
||||
db_values = [select.value for select in db_selects]
|
||||
select_values = value.pop("select", [])
|
||||
missing_values = [select for select in db_values if select not in select_values]
|
||||
|
||||
if select_values:
|
||||
|
|
|
|||
Loading…
Reference in a new issue