Fix backreferences to the same table

This commit is contained in:
evilchili
2025-09-29 23:40:25 -07:00
parent de72d38b8f
commit 40b6650970
3 changed files with 16 additions and 7 deletions
+4
View File
@@ -68,9 +68,13 @@ def test_subgroups(db):
snw = db.save(examples.Group(name="Strange New Worlds", members=[pike]))
starfleet = db.save(examples.Group(name="Starfleet", groups=[tos, snw]))
tos = db.table("Group").get(doc_id=tos.doc_id)
snw = db.table("Group").get(doc_id=snw.doc_id)
assert tos in starfleet.groups
assert snw in starfleet.groups
assert tos.parent.uid == starfleet.uid
unique_users = set([user for group in starfleet.groups for user in group.members])
kirk = db.table("User").get(doc_id=kirk.doc_id)