# HG changeset patch # User Pierre-Yves David # Date 1352477658 -3600 # Node ID df16bd045caefb2119d6d9a652ac5773ebf015bb # Parent ac3cbf55d9fb532e37cba56856c18b5992bfd123 [server] fix repository initialisation Changeset d753d6a6798f was breaking database creation. Dropping the `config.creating` clause lead to trying to load the schema from database even in creation mode. Conditional are a bit altered and reordered to prevent this to happen. diff -r ac3cbf55d9fb -r df16bd045cae server/repository.py --- a/server/repository.py Tue Sep 11 12:42:26 2012 +0200 +++ b/server/repository.py Fri Nov 09 17:14:18 2012 +0100 @@ -223,15 +223,15 @@ config['connections-pool-size'] = 1 # will be reinitialized later from cubes found in the database config._cubes = None - elif config.read_instance_schema: - # normal start: load the instance schema from the database - self.fill_schema() - else: + elif config.creating or not config.read_instance_schema: if not config.creating: # test start: use the file system schema (quicker) self.warning("set fs instance'schema") config.bootstrap_cubes() self.set_schema(config.load_schema()) + else: + # normal start: load the instance schema from the database + self.fill_schema() if not config.creating: self.init_sources_from_database() if 'CWProperty' in self.schema: