# HG changeset patch # User Adrien Di Mascio # Date 1315928114 -7200 # Node ID 18a366267612dff662dc78f104772686b4a38444 # Parent 8b70a0fb840ac2a30c1446ae8956d543e2bff996 [repo] use smarter query to check asource presence on startup (closes #1922099) diff -r 8b70a0fb840a -r 18a366267612 server/sources/native.py --- a/server/sources/native.py Tue Sep 13 15:40:31 2011 +0200 +++ b/server/sources/native.py Tue Sep 13 17:35:14 2011 +0200 @@ -412,7 +412,8 @@ def init(self, activated, source_entity): self.init_creating(source_entity._cw.cnxset) try: - source_entity._cw.system_sql('SELECT COUNT(asource) FROM entities') + # test if 'asource' column exists + source_entity._cw.system_sql('SELECT asource FROM entities LIMIT 1') except Exception, ex: self.eid_type_source = self.eid_type_source_pre_131