Skip to content

Commit

Permalink
Skipping when the default is not a string.
Browse files Browse the repository at this point in the history
  • Loading branch information
nribeka committed Oct 4, 2019
1 parent ab4e192 commit 6425ea9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pyxform/survey_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
from pyxform import constants
from pyxform.errors import PyXFormError
from pyxform.question_type_dictionary import QUESTION_TYPE_DICT
from pyxform.utils import INVALID_XFORM_TAG_REGEXP, is_valid_xml_tag, node, unicode
from pyxform.utils import (
INVALID_XFORM_TAG_REGEXP,
is_valid_xml_tag,
node,
unicode,
basestring,
)
from pyxform.xls2json import print_pyobj_to_json

try:
Expand Down Expand Up @@ -336,6 +342,9 @@ def needs_itext_ref(self):
)

def dynamic_default(self):
if not isinstance(self.default, basestring):
return False

expression = []
contains_dynamic = False
expression_construct = {"[", "]", "{", "}", "(", ")"}
Expand Down

0 comments on commit 6425ea9

Please sign in to comment.