Store patches as objects instead of strings

This commit is contained in:
2025-11-09 02:05:08 +01:00
parent a8c51ce84b
commit a477e5c4c2

View File

@@ -43,8 +43,8 @@ def node_encoder(node: dict):
except Exception as e:
e.add_note(f"While rendering for: {node['hostname']}")
raise e
# Parse the rendered yaml and convert it to a json patch
return json.dumps(yaml.safe_load(rendered))
# Parse the rendered yaml
return yaml.safe_load(rendered)
return super().default(o)