[dbapi] load_appobjects must attempt to load available cubicweb configurations to avoid error when some object use a persistent propery (CWProperty) defined there. Closes #2497697 stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 28 Sep 2012 17:49:54 +0200
branchstable
changeset 8571 7e5246889148
parent 8568 56d9eb013feb
child 8572 e54b3bc39011
[dbapi] load_appobjects must attempt to load available cubicweb configurations to avoid error when some object use a persistent propery (CWProperty) defined there. Closes #2497697
dbapi.py
--- a/dbapi.py	Mon Oct 01 12:49:34 2012 +0200
+++ b/dbapi.py	Fri Sep 28 17:49:54 2012 +0200
@@ -597,7 +597,12 @@
             esubpath = list(subpath)
             esubpath.remove('views')
             esubpath.append(join('web', 'views'))
+        # first load available configs, necessary for proper persistent
+        # properties initialization
+        config.load_available_configs()
+        # then init cubes
         config.init_cubes(cubes)
+        # then load appobjects into the registry
         vpath = config.build_vregistry_path(reversed(config.cubes_path()),
                                             evobjpath=esubpath,
                                             tvobjpath=subpath)