Skip to content

Commit e4a8c7a

Browse files
committed
[#151] Correctly convert with only one iati-activity
1 parent d279b17 commit e4a8c7a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

flattentool/json_input.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ def __init__(self, json_filename=None, root_json_dict=None, schema_parser=None,
6666

6767
if self.xml:
6868
with codecs.open(json_filename, 'rb') as xml_file:
69-
root_json_dict = xmltodict.parse(xml_file)['iati-activities']
69+
root_json_dict = xmltodict.parse(
70+
xml_file,
71+
force_list=(root_list_path,),
72+
)['iati-activities']
7073
json_filename = None
7174

7275
if json_filename is None and root_json_dict is None:

0 commit comments

Comments
 (0)