From 86efe78d3abd0c2ae1de6db184496ec607ad5c61 Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Tue, 12 Nov 2024 16:37:59 +0100 Subject: [PATCH] feat(models): add methods to Membership relation --- apis_instance_nsvis/models.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apis_instance_nsvis/models.py b/apis_instance_nsvis/models.py index 868c604..e6774c3 100644 --- a/apis_instance_nsvis/models.py +++ b/apis_instance_nsvis/models.py @@ -65,6 +65,14 @@ class IsMemberOf(Relation): subj_model = Person obj_model = Institution + @classmethod + def name(self) -> str: + return "is member of" + + @classmethod + def reverse_name(self) -> str: + return "has as member" + class LivesIn(Relation): subj_model = Person