From bac78c88c01778a4ac9a88c801ef8e6163b066b8 Mon Sep 17 00:00:00 2001 From: "Eric Y. Wang" Date: Mon, 10 Jul 2023 08:07:55 -0500 Subject: [PATCH] return type --- djutils/links.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/djutils/links.py b/djutils/links.py index ef603e3..6c9544f 100644 --- a/djutils/links.py +++ b/djutils/links.py @@ -44,7 +44,7 @@ def clean(cls): for table in cls.tables: part = getattr(cls, table) master = cls & {f"{cls.name}_type": part.__name__} - keys += (master - part).fetch("KEY") + keys += (master - part).fetch(dj.key) (cls & keys).delete() @@ -70,7 +70,7 @@ def query(cls, link_type, link_key=None): Returns ------- - dj.Lookup + djutils.links.Link link table restricted by link type, and optionally restricted by link key """ keys = cls & {f"{cls.name}_type": link_type}