[POS-commit] r6421 - stoqlib/trunk/stoqlib/lib

Johan Dahlin jdahlin at async.com.br
Tue Apr 24 15:50:23 BRT 2007


Author: jdahlin
Date: Tue Apr 24 15:50:23 2007
New Revision: 6421

Modified:
   stoqlib/trunk/stoqlib/lib/parameters.py

Log:
Return None if the value is unset

Modified: stoqlib/trunk/stoqlib/lib/parameters.py
==============================================================================
--- stoqlib/trunk/stoqlib/lib/parameters.py	(original)
+++ stoqlib/trunk/stoqlib/lib/parameters.py	Tue Apr 24 15:50:23 2007
@@ -431,6 +431,8 @@
         if value is None:
             return
         if issubclass(field_type, AbstractModel):
+            if value.field_value == '':
+                return
             param = field_type.get(value.field_value, connection=self.conn)
         else:
             # XXX: workaround to works with boolean types:


More information about the POS-commit mailing list