server/repository.py
branchstable
changeset 2875 b7399ef8b3e0
parent 2873 51bcd8e8f65c
child 2880 bfc8e1831290
child 2920 64322aa83a1d
child 2929 51cdfe069e10
equal deleted inserted replaced
2874:acdd8d8c2cff 2875:b7399ef8b3e0
  1002             rschema = eschema.subject_relation(attr)
  1002             rschema = eschema.subject_relation(attr)
  1003             if not rschema.is_final(): # inlined relation
  1003             if not rschema.is_final(): # inlined relation
  1004                 relations.append((attr, entity[attr]))
  1004                 relations.append((attr, entity[attr]))
  1005         if source.should_call_hooks:
  1005         if source.should_call_hooks:
  1006             self.hm.call_hooks('before_add_entity', etype, session, entity)
  1006             self.hm.call_hooks('before_add_entity', etype, session, entity)
  1007         entity.edited_attributes = entity.keys()
  1007         entity.edited_attributes = set(entity)
  1008         entity.set_defaults()
  1008         entity.set_defaults()
  1009         entity.check(creation=True)
  1009         entity.check(creation=True)
  1010         source.add_entity(session, entity)
  1010         source.add_entity(session, entity)
  1011         if source.uri != 'system':
  1011         if source.uri != 'system':
  1012             extid = source.get_extid(entity)
  1012             extid = source.get_extid(entity)