283 # attributes, else we may accidentaly skip a desired security check |
283 # attributes, else we may accidentaly skip a desired security check |
284 if hasattr(self, 'edited_attributes') and \ |
284 if hasattr(self, 'edited_attributes') and \ |
285 attr not in self.edited_attributes: |
285 attr not in self.edited_attributes: |
286 self.edited_attributes.add(attr) |
286 self.edited_attributes.add(attr) |
287 self.skip_security_attributes.add(attr) |
287 self.skip_security_attributes.add(attr) |
|
288 |
|
289 def pop(self, attr, default=_marker): |
|
290 """override pop to update self.edited_attributes on cleanup of |
|
291 undesired changes introduced in the entity's dict. See `__delitem__` |
|
292 """ |
|
293 if default is _marker: |
|
294 value = super(Entity, self).pop(attr) |
|
295 else: |
|
296 value = super(Entity, self).pop(attr, default) |
|
297 if hasattr(self, 'edited_attributes') and attr in self.edited_attributes: |
|
298 self.edited_attributes.remove(attr) |
|
299 return value |
288 |
300 |
289 def rql_set_value(self, attr, value): |
301 def rql_set_value(self, attr, value): |
290 """call by rql execution plan when some attribute is modified |
302 """call by rql execution plan when some attribute is modified |
291 |
303 |
292 don't use dict api in such case since we don't want attribute to be |
304 don't use dict api in such case since we don't want attribute to be |