Author: reinhard
Date: 2007-04-07 10:21:30 -0500 (Sat, 07 Apr 2007)
New Revision: 9462
Modified:
trunk/gnue-forms/src/GFObjects/GFField.py
Log:
Don't include empty choice if it is not allowed (i.e. if the field is
required).
Modified: trunk/gnue-forms/src/GFObjects/GFField.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFField.py 2007-04-07 14:34:42 UTC (rev 9461)
+++ trunk/gnue-forms/src/GFObjects/GFField.py 2007-04-07 15:21:30 UTC (rev 9462)
@@ -539,7 +539,10 @@
def __loadAllowedValues(self, resultSet):
- self.__lookup_list = [u""]
+ if self.required:
+ self.__lookup_list = []
+ else:
+ self.__lookup_list = [u""]
self.__lookup_dict = {}
self.__lookup_dict_reverse = {}
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.