Skip to content

Commit c43fc43

Browse files
committed
handle choice list_name as pyxform variable
1 parent 972fde2 commit c43fc43

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/formpack/schema/fields.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@ def from_json_definition(cls, definition, hierarchy=None,
157157

158158
if data_type in ('select_one', 'select_multiple'):
159159
choice_id = definition['select_from_list_name']
160-
choice = field_choices[choice_id]
160+
# pyxform#472 introduced dynamic list_names for select_one with the
161+
# format of `select_one ${question_name}`. The choices are
162+
# therefore not within a separate choice list
163+
if not choice_id.startswith('$'):
164+
choice = field_choices[choice_id]
161165

162166
data_type_classes = {
163167
# selects

0 commit comments

Comments
 (0)