Skip to content

Commit

Permalink
merge dev into main - fix empty label in create 121 program (#53)
Browse files Browse the repository at this point in the history
* fix empty label bug
  • Loading branch information
tijsziere authored Nov 5, 2024
1 parent 7465e47 commit d5c2ee5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion routes/routes121.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ async def create_121_program_from_kobo(
koboConnectHeader.append(row["name"])
question = {
"name": row["name"],
"label": {"en": str(row["label"][0])},
# check if label exists, otherwise use name:
"label": {"en": str(row["label"][0]) if not isinstance(row["label"], float) else row["name"]},
"answerType": type_mapping[row["type"].split()[0]],
"questionType": "standard",
"options": [],
Expand Down

0 comments on commit d5c2ee5

Please sign in to comment.