mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
Sort same versions by date.
This commit is contained in:
parent
22144c7828
commit
3f85103990
1 changed files with 6 additions and 0 deletions
|
|
@ -169,6 +169,12 @@ class RVAction(BaseAction):
|
|||
except KeyError:
|
||||
version_mapping[entity["version"]["version"]] = [entity]
|
||||
|
||||
# Sort same versions by date.
|
||||
for version, entities in version_mapping.items():
|
||||
version_mapping[version] = sorted(
|
||||
entities, key=lambda x: x["version"]["date"], reverse=True
|
||||
)
|
||||
|
||||
components[parent_name] = []
|
||||
for version in reversed(sorted(version_mapping.keys())):
|
||||
components[parent_name].extend(version_mapping[version])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue