Skip to content

Commit ee751a3

Browse files
authored
bug: further template regression testing changes (baserow#5376)
1 parent b4c6fed commit ee751a3

65 files changed

Lines changed: 6987 additions & 213 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

backend/src/baserow/contrib/builder/application_types.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def serialize_for_regression_testing(self, builder: Builder) -> dict:
587587
regressions across template changes.
588588
589589
Children are grouped by slot (place_in_container) and slots are ordered by
590-
the minimum ``order`` value among their members, so the output is stable
590+
the minimum element ``id`` among their members, so the output is stable
591591
regardless of cross-slot insertion history.
592592
593593
:param builder: The builder application instance to serialize.
@@ -613,12 +613,13 @@ def build_tree(parent_id):
613613
by_slot[el.place_in_container or ""].append(el)
614614
ordered = []
615615
for slot in sorted(
616-
by_slot, key=lambda s: min(e.order for e in by_slot[s])
616+
by_slot, key=lambda s: min(e.id for e in by_slot[s])
617617
):
618618
ordered.extend(sorted(by_slot[slot], key=lambda e: (e.order, e.id)))
619619
return [
620620
{
621621
"type": element.get_type().type,
622+
"place_in_container": element.place_in_container or "",
622623
"children": build_tree(element.id),
623624
}
624625
for element in ordered

0 commit comments

Comments
 (0)