[core] Fix Types filter.
authorVincent Michel <vincent.michel@logilab.fr>
Thu, 27 Jun 2013 18:25:48 +0200
changeset 331 f91e69ca8fca
parent 330 d43bdb4eb8f4
child 332 5f12e8b7c094
[core] Fix Types filter.
core.py
--- a/core.py	Thu Jun 27 18:26:40 2013 +0200
+++ b/core.py	Thu Jun 27 18:25:48 2013 +0200
@@ -261,9 +261,9 @@
                 if seen_uris[uri]:
                     filtered_named_entities.append((uri, p, t))
             else:
-                results = sparql_query(query, self.endpoint)
+                results = sparql_query(self.query % {'uri': uri}, self.endpoint)
                 types = set([r['type']['value'] for r in results])
-                if not len(types.intersection(ACCEPTABLE_TYPES)):
+                if not len(types.intersection(self.accepted_types)):
                     seen_uris[uri] = False
                 else:
                     seen_uris[uri] = True