Skip to content
Snippets Groups Projects
Verified Commit 31a2f79c authored by Daniel Hornung's avatar Daniel Hornung
Browse files

FIX: Indirect references work now.

parents 3c5c5a1c 2bdd7286
No related branches found
No related tags found
2 merge requests!100WIP: Filling XLSX: Seems to be working.,!93Filling XLSX: Everything except multiple choice.
Pipeline #48406 passed
......@@ -187,6 +187,14 @@ class TemplateFiller:
for name, value in data.items():
if not isinstance(value, (dict, list)):
self[name] = value
elif isinstance(value, dict):
if isinstance(list(value.items())[0], list):
continue
old_path = self._current_path
new_path = self._current_path.copy() + [name]
self._current_path = new_path
self.fill_from_data(data=value)
self._current_path = old_path
def _create_index(self):
"""Create a sheet index for the workbook.
......
File added
......@@ -80,7 +80,7 @@ def test_fill_xlsx():
schema=rfp("data/multiple_refs_schema.json"))
fill_and_compare(json_file=rfp("data/indirect_data.json"),
template_file=rfp("data/indirect_template.xlsx"),
known_good=rfp("data/multiple_refs_data.xlsx"),
known_good=rfp("data/indirect_data.xlsx"),
schema=rfp("data/indirect_schema.json"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment