diff --git a/simplestore/lib/simplestore_model/HTML5ModelConverter.py b/simplestore/lib/simplestore_model/HTML5ModelConverter.py index 06d2eeeb9d..24bbe900f6 100644 --- a/simplestore/lib/simplestore_model/HTML5ModelConverter.py +++ b/simplestore/lib/simplestore_model/HTML5ModelConverter.py @@ -202,15 +202,16 @@ class SelectFieldWithInput(SelectField): filtering = "" other = "" - def __init__(self, other="", filtering="", cardinality="1", + def __init__(self, other="", filtering="", cardinality=1, data_provide="", data_source="", **field_args): - # make list of tuples for SelectField (only once) self.cardinality = cardinality self.other = other self.filtering = filtering + # make list of tuples for SelectField (only once) if isinstance(data_source[0], basestring): field_args['choices'] = [(x,x) for x in data_source] - field_args['choices'].append(('other', other)) + if other: + field_args['choices'].append(('other', other)) super(SelectFieldWithInput, self).__init__(**field_args)