equal
deleted
inserted
replaced
16 eid = entity.eid |
16 eid = entity.eid |
17 eschema = entity.e_schema |
17 eschema = entity.e_schema |
18 # ._default_set is only there on entity creation to indicate unspecified |
18 # ._default_set is only there on entity creation to indicate unspecified |
19 # attributes which has been set to a default value defined in the schema |
19 # attributes which has been set to a default value defined in the schema |
20 defaults = getattr(entity, '_default_set', ()) |
20 defaults = getattr(entity, '_default_set', ()) |
21 for attr in entity.keys(): |
21 try: |
|
22 editedattrs = entity.edited_attributes |
|
23 except AttributeError: |
|
24 editedattrs = entity.keys() |
|
25 for attr in editedattrs: |
22 if attr in defaults: |
26 if attr in defaults: |
23 continue |
27 continue |
24 rschema = eschema.subject_relation(attr) |
28 rschema = eschema.subject_relation(attr) |
25 if rschema.is_final(): # non final relation are checked by other hooks |
29 if rschema.is_final(): # non final relation are checked by other hooks |
26 # add/delete should be equivalent (XXX: unify them into 'update' ?) |
30 # add/delete should be equivalent (XXX: unify them into 'update' ?) |