[Mpuls-commits] r5763 - base/trunk/mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Jan 10 12:51:52 CET 2012


Author: torsten
Date: 2012-01-10 12:51:50 +0100 (Tue, 10 Jan 2012)
New Revision: 5763

Modified:
   base/trunk/mpulsweb/model/case.py
Log:
Add support for RadioNodes in get_unknown_value function. 


Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py	2012-01-10 11:42:33 UTC (rev 5762)
+++ base/trunk/mpulsweb/model/case.py	2012-01-10 11:51:50 UTC (rev 5763)
@@ -39,7 +39,7 @@
 from mpulsweb.lib.translation import _
 
 from formed.meta.data import RepeatNode, DateLeaf, IntLeaf, TextLeaf,\
-     ChoiceNode, RuleLeaf
+     ChoiceNode, RadioNode, RuleLeaf
 from formed.instance.backends.postgres import DBFactory as InstanceFactory
 from formed.instance.backends.xmlimport import XMLImportException
 from formed.instance.backends.dbxmlimport import DBXMLImporter
@@ -139,6 +139,8 @@
         value = g.mpuls_config.get('case', 'default-autocomplete-text')
     elif isinstance(meta, ChoiceNode):
         value = g.mpuls_config.get('case', 'default-autocomplete-choice')
+    elif isinstance(meta, RadioNode):
+        value = g.mpuls_config.get('case', 'default-autocomplete-choice')
     else:
         value = None
     return value



More information about the Mpuls-commits mailing list