mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
app_config_get: do not raise error if no config panel found on API
This commit is contained in:
parent
2d3546247a
commit
f096a14189
1 changed files with 9 additions and 2 deletions
11
src/app.py
11
src/app.py
|
@ -1666,8 +1666,15 @@ def app_config_get(app, key="", full=False, export=False):
|
|||
else:
|
||||
mode = "classic"
|
||||
|
||||
config_ = AppConfigPanel(app)
|
||||
return config_.get(key, mode)
|
||||
try:
|
||||
config_ = AppConfigPanel(app)
|
||||
return config_.get(key, mode)
|
||||
except YunohostValidationError as e:
|
||||
if Moulinette.interface.type == 'api' and e.key == "config_no_panel":
|
||||
# Be more permissive when no config panel found
|
||||
return {}
|
||||
else:
|
||||
raise
|
||||
|
||||
|
||||
@is_unit_operation()
|
||||
|
|
Loading…
Add table
Reference in a new issue