Clarify the thing about current_value vs value

This commit is contained in:
Alexandre Aubin 2022-12-06 23:21:28 +01:00 committed by GitHub
parent 744f963508
commit b47d2c7476
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -653,6 +653,7 @@ class ConfigPanel:
value = self.values[option["name"]]
# Allow to use value instead of current_value in app config script.
# e.g. apps may write `echo 'value: "foobar"'` in the config file (which is more intuitive that `echo 'current_value: "foobar"'`
# For example hotspot used it...
# See https://github.com/YunoHost/yunohost/pull/1546
if isinstance(value, dict) and "value" in value and "current_value" not in value: