relationship stuff basically working

This commit is contained in:
Helmut Merz 2024-03-16 18:03:32 +01:00
parent e676e10e33
commit 13706c3d84
2 changed files with 7 additions and 4 deletions

View file

@ -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)

View file

@ -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()