From ef62622be37a5f3bb1ec14a3a21bda024b511e13 Mon Sep 17 00:00:00 2001 From: Anet Date: Thu, 30 Apr 2020 02:02:37 +0200 Subject: [PATCH] =?UTF-8?q?models:=20zm=C4=9Bna=20TreeNode.first=5Fchild?= =?UTF-8?q?=20na=20OneToOneField=20m=C3=ADsto=20ForeignKey=20(kv=C5=AFli?= =?UTF-8?q?=20funk=C4=8Dnosti=20vazby=20v=20opa=C4=8Dn=C3=A9m=20sm=C4=9Bru?= =?UTF-8?q?=20-=20jinak=20vrac=C3=AD=20RelatedManager=20fuj=20fuj=20fuj)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seminar/models.py b/seminar/models.py index 57d4304a..43d6e59d 100644 --- a/seminar/models.py +++ b/seminar/models.py @@ -1246,7 +1246,7 @@ class TreeNode(PolymorphicModel): blank = False, on_delete = models.SET_NULL, # Vrcholy s null kořenem jsou sirotci bez ročníku verbose_name="kořen stromu") - first_child = models.ForeignKey('TreeNode', + first_child = models.OneToOneField('TreeNode', related_name='father_of_first', null = True, blank = True,