From 09da9a8d926b31d130ab61815d88d2a3af5991c0 Mon Sep 17 00:00:00 2001 From: Sophie Schiller Date: Sat, 11 Sep 2021 20:06:17 +0200 Subject: [PATCH] bundle/hedgedoc improve config rendering to not produce errors with faults --- bundles/hedgedoc/files/config.json | 3 +++ bundles/hedgedoc/items.py | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 bundles/hedgedoc/files/config.json diff --git a/bundles/hedgedoc/files/config.json b/bundles/hedgedoc/files/config.json new file mode 100644 index 0000000..211f951 --- /dev/null +++ b/bundles/hedgedoc/files/config.json @@ -0,0 +1,3 @@ +<% + from bundlewrap.metadata import metadata_to_json +%>${metadata_to_json(repo.libs.faults.resolve_faults(node.metadata.get('hedgedoc/config')))} diff --git a/bundles/hedgedoc/items.py b/bundles/hedgedoc/items.py index b8302cb..69389a0 100644 --- a/bundles/hedgedoc/items.py +++ b/bundles/hedgedoc/items.py @@ -1,5 +1,3 @@ -from bundlewrap.metadata import metadata_to_json - repo.libs.tools.require_bundle(node, 'nodejs') directories = { @@ -22,7 +20,7 @@ git_deploy = { files = { '/opt/hedgedoc/config.json': { - 'content': metadata_to_json(node.metadata.get('hedgedoc/config')), + 'content_type': 'mako', 'needs': { 'git_deploy:/opt/hedgedoc', },