Closed jerch closed 2 years ago
Repro from modified docs example:
# wrong order >>> MultiC.objects.create() <class 'klaus.models.MultiC'> <class 'klaus.models.MultiB'> sub-c <class 'klaus.models.MultiBase'> b ... >>> active_resolver._querysets_for_update(MultiC,MultiC.objects.filter(pk=4)) OrderedDict([ (<class 'klaus.models.MultiB'>, [<QuerySet [<MultiB: MultiB object (4)>]>, {'comp'}]), (<class 'klaus.models.MultiBase'>, [<QuerySet [<MultiBase: MultiBase object (4)>]>, {'comp'}]) ]) # correct order >>> MultiC.objects.create() <class 'klaus.models.MultiC'> <class 'klaus.models.MultiBase'> b <class 'klaus.models.MultiB'> sub-c ... >>> active_resolver._querysets_for_update(MultiC,MultiC.objects.filter(pk=4)) OrderedDict([ (<class 'klaus.models.MultiBase'>, [<QuerySet [<MultiBase: MultiBase object (4)>]>, {'comp'}]), (<class 'klaus.models.MultiB'>, [<QuerySet [<MultiB: MultiB object (4)>]>, {'comp'}]) ])
We lose somewhere in the resolver the ordering information, thus the cf comp on MultiC(MultiB(MultiBase)) wrongly get filled from MultiB execution.
comp
MultiC(MultiB(MultiBase))
Repro from modified docs example:
We lose somewhere in the resolver the ordering information, thus the cf
comp
onMultiC(MultiB(MultiBase))
wrongly get filled from MultiB execution.