equal
deleted
inserted
replaced
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 |