From b678337955afe5bdb7a1c2a022d70bd173e5743e Mon Sep 17 00:00:00 2001 From: LEdoian Date: Wed, 1 May 2019 00:46:59 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20clashes=20v=20*Node=20v=C4=9Bcech?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/seminar/models.py b/seminar/models.py index 48ac2e60..97fee733 100644 --- a/seminar/models.py +++ b/seminar/models.py @@ -1095,6 +1095,7 @@ class TreeNode(models.Model): class Meta: abstract = True root = models.ForeignKey('self', + related_name="potomci_set", null = True, blank = False, on_delete = models.SET_NULL, # Vrcholy s null kořenem jsou sirotci bez ročníku @@ -1105,6 +1106,7 @@ class TreeNode(models.Model): on_delete=models.SET_NULL, verbose_name="první potomek") succ = models.ForeignKey('self', + related_name="prev", null = True, blank = True, on_delete=models.SET_NULL,