server/__init__.py
changeset 11090 b4b854c25de5
parent 10894 c8c6ad8adbdb
--- a/server/__init__.py	Fri Jan 29 10:06:36 2016 +0100
+++ b/server/__init__.py	Thu Jan 28 18:17:30 2016 +0100
@@ -297,6 +297,9 @@
     # re-login using the admin user
     config._cubes = None # avoid assertion error
     repo = get_repository(config=config)
+    # replace previous schema by the new repo's one. This is necessary so that we give the proper
+    # schema to `initialize_schema` above since it will initialize .eid attribute of schema elements
+    schema = repo.schema
     with connect(repo, login, password=pwd) as cnx:
         with cnx.security_enabled(False, False):
             repo.system_source.eid = ssource.eid # redo this manually