Skip to content

Commit

Permalink
Properly expand select_one_from_file
Browse files Browse the repository at this point in the history
…to `select_one_from_file file.csv` instead of having
`select_one_from_file` in the `type` column and `file.csv` in a
nonstandard `file` column.

Fixes a problem introduced in #314
  • Loading branch information
jnm committed Jan 25, 2024
1 parent 3c2ca33 commit 0840bff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/formpack/utils/flatten_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,6 @@ def _flatten_survey_row(row):
row['type'] = '{} {} or_other'.format(_type, _list_name)
else:
row['type'] = '{} {}'.format(_type, _list_name)
elif row['type'] == 'select_one_from_file' and 'file' in row:
_file = row.pop('file')
row['type'] = '{} {}'.format(_type, _file)

0 comments on commit 0840bff

Please sign in to comment.