fix(web-app-nextcloud): JSON-encode list/dict addon configvalues in plugin loader

occ config:app:set serialised non-mapping sequences via | string (Python repr), so list/dict configvalues like xwiki instances persisted as invalid JSON and the consumer fell back to empty. Encode any non-string sequence as JSON too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 4.8 committed 2026-06-21 06:03:06 +02:00
1 parent d2f5efa7fe
commit 9aa975d665
1 file changed
+1 -1
@@ -11,7 +11,7 @@
{% for item in (addon_spec.config.plugin_configuration | default([])) %}
{{ NEXTCLOUD_DOCKER_EXEC_OCC }} \
config:app:set {{ item.appid }} {{ item.configkey }} \
--value '{{ ( (item.configvalue | to_json) if (item.configvalue is mapping) else (item.configvalue | string) )
--value '{{ ( (item.configvalue | to_json) if (item.configvalue is mapping or (item.configvalue is sequence and item.configvalue is not string)) else (item.configvalue | string) )
| regex_replace("'", "'" ~ '"' ~ "'" ~ '"' ~ "'") }}'
{% endfor %}
args: