Commit df0c3f0c authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[schema synchronization] get back eid when adding a final entity type, else it...

[schema synchronization] get back eid when adding a final entity type, else it may cause pb on later schema synchronization during the migration where the type is added

--HG--
branch : stable
parent 00548a4b22a6
...@@ -912,6 +912,10 @@ class AfterAddCWETypeHook(DelCWETypeHook): ...@@ -912,6 +912,10 @@ class AfterAddCWETypeHook(DelCWETypeHook):
def __call__(self): def __call__(self):
entity = self.entity entity = self.entity
if entity.cw_edited.get('final'): if entity.cw_edited.get('final'):
# final entity types don't need a table in the database and are
# systematically added by yams at initialization time so there is no
# need to do further processing. Simply assign its eid.
self._cw.vreg.schema[entity.name].eid = entity.eid
return return
CWETypeAddOp(self._cw, entity=entity) CWETypeAddOp(self._cw, entity=entity)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment