Skip to content

Commit

Permalink
generator: Make sure a choice or value exists
Browse files Browse the repository at this point in the history
fixes #437

Both the choice name or the value or spread name need to exist to add
the choice. Ignore other lines
  • Loading branch information
tahini committed Apr 10, 2024
1 parent 7560036 commit 57bab85
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/evolution-generator/src/scripts/generate_choices.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def generate_choices(input_file: str, output_file: str):
spread_choices_name = row_dict["spreadChoicesName"]
conditional = row_dict["conditional"]

if choice_name is None or (value is None and spread_choices_name is None):
continue

# Create choice object with value and language-specific labels
choice = {
"value": value,
Expand Down

0 comments on commit 57bab85

Please sign in to comment.