[gnue] r9706 - trunk/gnue-forms/src/GFObjects

[email protected]
Newsgroups gmane.comp.cms.gnue.cvs
Message-ID <[email protected]>
Author: jamest
Date: 2007-06-12 07:33:26 -0500 (Tue, 12 Jun 2007)
New Revision: 9706

Modified:
   trunk/gnue-forms/src/GFObjects/GFField.py
Log:
check for invalid type value prior to using string methods on value


Modified: trunk/gnue-forms/src/GFObjects/GFField.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFField.py	2007-06-12 10:09:40 UTC (rev 9705)
+++ trunk/gnue-forms/src/GFObjects/GFField.py	2007-06-12 12:33:26 UTC (rev 9706)
@@ -313,12 +313,12 @@
 
         if value is None:
             return None
+        elif isinstance(value, datatypes.InvalidValueType):
+            return value
         elif self._block.mode == 'query' and value.lower() == u_("(all)"):
             return ''
         elif self._block.mode == 'query' and value.lower() == u_("(empty)"):
             return chr(0)
-        elif isinstance(value, datatypes.InvalidValueType):
-            return value
         elif value in self.__lookup_dict_reverse:
             return self.__lookup_dict_reverse[value]
         else:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.