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,
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue