cubicweb/server/sources/datafeed.py
changeset 11253 be480b9d6ee2
parent 11252 6b1d09ef0c45
child 11254 4f467683b8c9
--- a/cubicweb/server/sources/datafeed.py	Wed Jul 01 08:42:44 2015 +0200
+++ b/cubicweb/server/sources/datafeed.py	Wed Jul 01 08:45:29 2015 +0200
@@ -289,11 +289,9 @@
                            eidfrom=entity.eid, rtype=attr, eidto=value)
 
     def source_uris(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)
+        sql = 'SELECT extid, eid, type FROM entities WHERE asource=%(source)s'
         return dict((self.decode_extid(uri), (eid, type))
-                    for uri, eid, type in cnx.system_sql(sql).fetchall())
+                    for uri, eid, type in cnx.system_sql(sql, {'source': self.uri}).fetchall())
 
     def init_import_log(self, cnx, import_log_eid=None, **kwargs):
         if import_log_eid is None: