server/sqlutils.py
changeset 6333 e3994fcc21c3
parent 6142 8bc6eac1fac1
parent 6284 c35b2ebeb3c9
child 6379 3f67f7ea5632
equal deleted inserted replaced
6293:df44d7163582 6333:e3994fcc21c3
   259         to insert/update an entity into a SQL database
   259         to insert/update an entity into a SQL database
   260         """
   260         """
   261         attrs = {}
   261         attrs = {}
   262         eschema = entity.e_schema
   262         eschema = entity.e_schema
   263         for attr, value in entity.cw_edited.iteritems():
   263         for attr, value in entity.cw_edited.iteritems():
   264             rschema = eschema.subjrels[attr]
   264             if value is not None and eschema.subjrels[attr].final:
   265             if rschema.final:
   265                 atype = str(entity.e_schema.destination(attr))
   266                 atype = str(eschema.destination(attr))
       
   267                 if atype == 'Boolean':
   266                 if atype == 'Boolean':
   268                     value = self.dbhelper.boolean_value(value)
   267                     value = self.dbhelper.boolean_value(value)
   269                 elif atype == 'Password':
   268                 elif atype == 'Password':
   270                     # if value is a Binary instance, this mean we got it
   269                     # if value is a Binary instance, this mean we got it
   271                     # from a query result and so it is already encrypted
   270                     # from a query result and so it is already encrypted