fix(plugins): Setting a plugin setting to None removes that setting
This commit is contained in:
parent
f6c229d2ef
commit
dca52b764c
|
@ -96,7 +96,10 @@ class Plugin:
|
||||||
.one_or_none()
|
.one_or_none()
|
||||||
)
|
)
|
||||||
if setting is not None:
|
if setting is not None:
|
||||||
setting.value = value
|
if value is None:
|
||||||
|
db.session.delete(setting)
|
||||||
|
else:
|
||||||
|
setting.value = value
|
||||||
else:
|
else:
|
||||||
db.session.add(_PluginSetting(plugin=self.name, name=name, value=value))
|
db.session.add(_PluginSetting(plugin=self.name, name=name, value=value))
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
Loading…
Reference in New Issue