From d1d91996a907bee25a87fd554a935fa6fd670bf8 Mon Sep 17 00:00:00 2001 From: Dominik George <dominik.george@teckids.org> Date: Mon, 15 Jul 2019 12:54:58 +0200 Subject: [PATCH] Add guardians relationship to Person. --- biscuit/core/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/biscuit/core/models.py b/biscuit/core/models.py index 81939e414..38043f683 100644 --- a/biscuit/core/models.py +++ b/biscuit/core/models.py @@ -26,5 +26,8 @@ class Person(AbstractUser): import_ref = models.CharField(max_length=64) + guardians = models.ManyToManyField( + 'self', symmetrical=False, related_name='children') + def __str__(self): return '%s, %s' % (self.last_name, self.first_name) -- GitLab