소스 검색

Fix one-term slice in Imr. All tests green.

Stefano Cossu 6 년 전
부모
커밋
6019b397b0
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      lakesuperior/model/graph/graph.pyx

+ 1 - 3
lakesuperior/model/graph/graph.pyx

@@ -852,9 +852,7 @@ cdef class Imr(SimpleGraph):
 
         elif isinstance(item, Node):
             # If a Node is given, return all values for that predicate.
-            return {
-                    r[2] for r in self.data
-                    if r[0] == self.id and r[1] == item}
+            return self._slice(self.uri, item, None)
         else:
             raise TypeError(f'Wrong slice format: {item}.')