Skip to content

Commit

Permalink
feat(models): add methods to Membership relation
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Nov 13, 2024
1 parent 776d899 commit 86efe78
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apis_instance_nsvis/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 86efe78

Please sign in to comment.