Skip to content

Commit b4e5abe

Browse files
committed
added a little specificity and clarity
1 parent 8e2d9d3 commit b4e5abe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/formpack/schema/fields.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ def from_json_definition(cls, definition, hierarchy=None,
160160
# pyxform#472 introduced dynamic list_names for select_one with the
161161
# format of `select_one ${question_name}`. The choices are
162162
# therefore not within a separate choice list
163-
if not choice_id.startswith('$'):
163+
if choice_id.startswith('${') and choice_id.endswith('}'):
164+
# ${dynamic_choice}, so question will be treated as a TextField
165+
choice = None
166+
else:
164167
choice = field_choices[choice_id]
165168

166169
data_type_classes = {

0 commit comments

Comments
 (0)