mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
OP-2951 - change sort by depth
Previous sorting by _id might not be deterministic, not reliable. The main logic is to have outputs sorted by how they were traversed, which should be denoted by 'depth' field.
This commit is contained in:
parent
af079897a8
commit
b826cfac41
1 changed files with 1 additions and 1 deletions
|
|
@ -2067,7 +2067,7 @@ def _process_referenced_pipeline_result(result, link_type):
|
|||
|
||||
# outputs_recursive in random order, sort by _id
|
||||
outputs_recursive = sorted(item.get("outputs_recursive", []),
|
||||
key=lambda d: d["_id"])
|
||||
key=lambda d: d["depth"])
|
||||
# go from oldest to newest
|
||||
# only older _id can reference another newer _id
|
||||
for output in outputs_recursive[::-1]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue