Skip to content

Fix max orderings in CreateElementChildren

Erwan Rouchet requested to merge fix-createelementchildren-max-orderings into master

Closes #1834 (closed)

The missing .values("path") meant that Django was not adding any GROUP BY when calculating max orderings for each path. This means that when there is more than one child element already present on the parent, there would be multiple maximum orderings per path, and the dict comprehension just picked whatever value got returned first and discard the rest. I added a second child element in an existing test and reproduced the issue, then fixed it with the .values("path").

Merge request reports

Loading