Skip to content

Commit cf673f0

Browse files
committed
avoiding setting choice value twice
1 parent b4e5abe commit cf673f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/formpack/schema/fields.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ def from_json_definition(cls, definition, hierarchy=None,
150150

151151
# normalize spaces
152152
data_type = definition['type']
153-
choice = None
154153

155154
if ' ' in data_type:
156155
raise ValueError('invalid data_type: %s' % data_type)
@@ -165,6 +164,8 @@ def from_json_definition(cls, definition, hierarchy=None,
165164
choice = None
166165
else:
167166
choice = field_choices[choice_id]
167+
else:
168+
choice = None
168169

169170
data_type_classes = {
170171
# selects

0 commit comments

Comments
 (0)