--- a/cwvreg.py Tue Aug 18 17:10:08 2009 +0200
+++ b/cwvreg.py Tue Aug 18 17:10:50 2009 +0200
@@ -228,8 +228,8 @@
config.init_log(debug=debug)
super(CubicWebVRegistry, self).__init__(config)
self.schema = None
+ self.initialized = False
self.reset()
- self.initialized = False
def setdefault(self, regid):
try:
@@ -256,10 +256,11 @@
# two special registries, propertydefs which care all the property
# definitions, and propertyvals which contains values for those
# properties
- self['propertydefs'] = {}
- self['propertyvalues'] = self.eprop_values = {}
- for key, propdef in self.config.eproperty_definitions():
- self.register_property(key, **propdef)
+ if not self.initialized:
+ self['propertydefs'] = {}
+ self['propertyvalues'] = self.eprop_values = {}
+ for key, propdef in self.config.eproperty_definitions():
+ self.register_property(key, **propdef)
if path is not None and force_reload:
cleanup_sys_modules(path)
cubes = self.config.cubes()