Skip to content

Commit

Permalink
check on the active product id before adding version_items
Browse files Browse the repository at this point in the history
  • Loading branch information
moonyuet committed Nov 26, 2024
1 parent 47fa5e5 commit fafcbe8
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions client/ayon_core/tools/sceneinventory/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ def _show_version_dialog(self, item_ids, active_repre_id):
version_items_by_project[project_name] = version_items_by_product_id

active_version_id = active_repre_info.version_id
active_product_id = active_repre_info.product_id
# active_product_id = active_repre_info.product_id

versions = set()
product_ids = set()
Expand All @@ -818,11 +818,6 @@ def _show_version_dialog(self, item_ids, active_repre_id):
product_ids_by_version_by_project[project_name] = (
product_ids_by_version
)
versions |= {
version_item.version
for version_item in
version_items_by_product_id[active_product_id].values()
}
for version_item_by_id in version_items_by_product_id.values():
for version_item in version_item_by_id.values():
version = version_item.version
Expand All @@ -838,8 +833,9 @@ def _show_version_dialog(self, item_ids, active_repre_id):
versions.add(version)
version_items.append((project_name, version_item))

def version_sorter(_, item):
def version_sorter(items):
hero_value = 0
item = items[-1]
i_version = item.version
if i_version < 0:
hero_value = 1
Expand Down

0 comments on commit fafcbe8

Please sign in to comment.