server/sqlutils.py
changeset 6333 e3994fcc21c3
parent 6142 8bc6eac1fac1
parent 6284 c35b2ebeb3c9
child 6379 3f67f7ea5632
--- a/server/sqlutils.py	Tue Sep 21 16:35:37 2010 +0200
+++ b/server/sqlutils.py	Thu Sep 23 23:28:58 2010 +0200
@@ -261,9 +261,8 @@
         attrs = {}
         eschema = entity.e_schema
         for attr, value in entity.cw_edited.iteritems():
-            rschema = eschema.subjrels[attr]
-            if rschema.final:
-                atype = str(eschema.destination(attr))
+            if value is not None and eschema.subjrels[attr].final:
+                atype = str(entity.e_schema.destination(attr))
                 if atype == 'Boolean':
                     value = self.dbhelper.boolean_value(value)
                 elif atype == 'Password':