# HG changeset patch # User Julien Cristau # Date 1390921626 -3600 # Node ID a5231a557ac024c294f4e5721a81784e20f59dab # Parent 592c22e1c5f0ca3af4867c605ba4cbca1799cfbf [server/repo] use internal_cnx in init_sources_from_database diff -r 592c22e1c5f0 -r a5231a557ac0 server/repository.py --- a/server/repository.py Wed Jan 29 15:25:05 2014 +0100 +++ b/server/repository.py Tue Jan 28 16:07:06 2014 +0100 @@ -266,9 +266,9 @@ or not 'CWSource' in self.schema: # # 3.10 migration self.system_source.init_creating() return - with self.internal_session() as session: + with self.internal_cnx() as cnx: # FIXME: sources should be ordered (add_entity priority) - for sourceent in session.execute( + for sourceent in cnx.execute( 'Any S, SN, SA, SC WHERE S is_instance_of CWSource, ' 'S name SN, S type SA, S config SC').entities(): if sourceent.name == 'system':