diff --git a/scopes/storage/concept.py b/scopes/storage/concept.py index 774bf60..f8f37c4 100644 --- a/scopes/storage/concept.py +++ b/scopes/storage/concept.py @@ -34,10 +34,10 @@ class Concepts(Container): indexes = None def queryRels(self, **crit): - pred = crit.get(predicate) - if pred is not None and isinstance(pred, ('string', 'bytes')): - crit['predicate'] = self.storage.getContainer(Predicate).queryLast(name=pred) - for k, v in crit.items: + #pred = crit.get(predicate) + #if pred is not None and isinstance(pred, ('string', 'bytes')): + # crit['predicate'] = self.storage.getContainer(Predicate).queryLast(name=pred) + for k, v in crit.items(): if isinstance(v, Track): crit[k] = v.uid rels = self.storage.getContainer(Triple) diff --git a/tests/tlib_storage.py b/tests/tlib_storage.py index 4d3ae3e..9ce54e5 100644 --- a/tests/tlib_storage.py +++ b/tests/tlib_storage.py @@ -114,5 +114,8 @@ def test_topic(self, config): topics.save(tp_proglang) tp_itc.addChild(tp_proglang) + c = list(tp_itc.children()) + self.assertEqual(c[0].getSecond().name, 'prog_lang') + storage.commit()