Skip to content

Commit

Permalink
Populate itemset instead of list_name value
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisRayM committed Oct 28, 2020
1 parent 2d020ba commit c21aaee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyxform/xls2json.py
Original file line number Diff line number Diff line change
Expand Up @@ -1186,10 +1186,10 @@ def replace_prefix(d, prefix):
):
new_json_dict["itemset"] = list_name
json_dict["choices"] = choices
elif file_extension in [".csv", ".xml"]:
elif file_extension in [".csv", ".xml"] or re.match(
r"\$\{(.*?)\}", list_name
):
new_json_dict["itemset"] = list_name
elif re.match(r"\$\{(.*?)\}", list_name):
new_json_dict["list_name"] = list_name
else:
new_json_dict["list_name"] = list_name
new_json_dict[constants.CHOICES] = choices[list_name]
Expand Down

0 comments on commit c21aaee

Please sign in to comment.