From 7737d155d5f3b856a77045c4eda5c70e32e9b998 Mon Sep 17 00:00:00 2001 From: Klara Peskova Date: Fri, 18 Apr 2014 23:24:31 +0200 Subject: [PATCH] Ontologies added to EUON. Fixes issue #96. --- simplestore/lib/simplestore_model/HTML5ModelConverter.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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)