models: změna TreeNode.first_child na OneToOneField místo ForeignKey (kvůli funkčnosti vazby v opačném směru - jinak vrací RelatedManager fuj fuj fuj)
This commit is contained in:
parent
322718f436
commit
ef62622be3
1 changed files with 1 additions and 1 deletions
|
@ -1246,7 +1246,7 @@ class TreeNode(PolymorphicModel):
|
||||||
blank = False,
|
blank = False,
|
||||||
on_delete = models.SET_NULL, # Vrcholy s null kořenem jsou sirotci bez ročníku
|
on_delete = models.SET_NULL, # Vrcholy s null kořenem jsou sirotci bez ročníku
|
||||||
verbose_name="kořen stromu")
|
verbose_name="kořen stromu")
|
||||||
first_child = models.ForeignKey('TreeNode',
|
first_child = models.OneToOneField('TreeNode',
|
||||||
related_name='father_of_first',
|
related_name='father_of_first',
|
||||||
null = True,
|
null = True,
|
||||||
blank = True,
|
blank = True,
|
||||||
|
|
Loading…
Reference in a new issue