server/__init__.py
branchstable
changeset 7186 287f2273917f
parent 7129 455b503fb7ff
child 7398 26695dd703d8
child 7529 2fdc310be7cd
--- a/server/__init__.py	Wed Apr 06 10:17:48 2011 +0200
+++ b/server/__init__.py	Wed Apr 06 16:00:56 2011 +0200
@@ -181,6 +181,7 @@
     session.execute('SET X owned_by U WHERE X is IN (CWGroup,CWSource), U eid %(u)s',
                     {'u': admin.eid})
     session.commit()
+    session.close()
     repo.shutdown()
     # reloging using the admin user
     config._cubes = None # avoid assertion error
@@ -204,7 +205,6 @@
     repo.system_source.init_creating()
     cnx.commit()
     cnx.close()
-    session.close()
     repo.shutdown()
     # restore initial configuration
     config.creating = False