[fix] Default config toml path

This commit is contained in:
ljf (zamentur) 2021-10-18 20:51:05 +02:00 committed by GitHub
parent c57e868ce2
commit 341059d07d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,7 +192,7 @@ def evaluate_simple_js_expression(expr, context={}):
class ConfigPanel:
entity_type = "config"
save_path_tpl = None
config_path_tpl = "/usr/share/yunohost/other/config_{entity}.toml"
config_path_tpl = "/usr/share/yunohost/other/config_{entity_type}.toml"
save_mode = "full"
@classmethod
@ -216,7 +216,7 @@ class ConfigPanel:
self.entity = entity
self.config_path = config_path
if not config_path:
self.config_path = self.config_path_tpl.format(entity=entity)
self.config_path = self.config_path_tpl.format(entity=entity, entity_type=self.entity_type)
self.save_path = save_path
if not save_path and self.save_path_tpl:
self.save_path = self.save_path_tpl.format(entity=entity)