fix(plugins): Setting a plugin setting to None removes that setting
This commit is contained in:
parent
f6c229d2ef
commit
dca52b764c
|
@ -96,6 +96,9 @@ class Plugin:
|
||||||
.one_or_none()
|
.one_or_none()
|
||||||
)
|
)
|
||||||
if setting is not None:
|
if setting is not None:
|
||||||
|
if value is None:
|
||||||
|
db.session.delete(setting)
|
||||||
|
else:
|
||||||
setting.value = value
|
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))
|
||||||
|
|
Loading…
Reference in New Issue