server/sources/datafeed.py
changeset 9860 e24bf60428d3
parent 9746 81b56897a377
child 9879 21278eb03bbf
--- a/server/sources/datafeed.py	Wed Jul 02 18:19:47 2014 +0200
+++ b/server/sources/datafeed.py	Wed Jun 04 15:46:16 2014 +0200
@@ -259,12 +259,12 @@
                 call_hooks('after_add_relation', session,
                            eidfrom=entity.eid, rtype=attr, eidto=value)
 
-    def source_cwuris(self, session):
+    def source_cwuris(self, cnx):
         sql = ('SELECT extid, eid, type FROM entities, cw_source_relation '
                'WHERE entities.eid=cw_source_relation.eid_from '
                'AND cw_source_relation.eid_to=%s' % self.eid)
         return dict((b64decode(uri), (eid, type))
-                    for uri, eid, type in session.system_sql(sql).fetchall())
+                    for uri, eid, type in cnx.system_sql(sql).fetchall())
 
     def init_import_log(self, session, **kwargs):
         dataimport = session.create_entity('CWDataImport', cw_import_of=self,