Commit 42220180 authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

fix: make items an array in export

parent d1b10b70
...@@ -133,9 +133,13 @@ def get_partners_from_daisy(): ...@@ -133,9 +133,13 @@ def get_partners_from_daisy():
return json.loads(entities_json_str) return json.loads(entities_json_str)
def save_exported_datasets_to_file(exported_datasets, output_file): def save_exported_datasets_to_file(exported_dataset, output_file):
if isinstance(exported_dataset, list):
items = exported_dataset
else:
items = [exported_dataset]
obj = { obj = {
"$schema": "https://git-r3lab.uni.lu/pinar.alper/metadata-tools/raw/master/metadata_tools/resources/elu-dataset.json", "$schema": "https://git-r3lab.uni.lu/pinar.alper/metadata-tools/raw/master/metadata_tools/resources/elu-dataset.json",
"items": exported_datasets "items": items
} }
return json.dump(obj, output_file, indent=4) return json.dump(obj, output_file, indent=4)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment