Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3468 from pypeclub/bugfix/query_version_fix
Browse files Browse the repository at this point in the history
General: Fix query function in update logic
  • Loading branch information
iLLiCiTiT authored Jul 7, 2022
2 parents 5d0108f + d9d8f7c commit 6f2f599
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions openpype/pipeline/load/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,12 @@ def get_representation_context(representation):

assert representation is not None, "This is a bug"

project_name = legacy_io.active_project()
if not isinstance(representation, dict):
representation = get_representation_by_id(representation)
representation = get_representation_by_id(
project_name, representation
)

project_name = legacy_io.active_project()
version, subset, asset, project = get_representation_parents(
project_name, representation
)
Expand Down Expand Up @@ -394,7 +396,7 @@ def update_container(container, version=-1):
assert current_representation is not None, "This is a bug"

current_version = get_version_by_id(
project_name, current_representation["_id"], fields=["parent"]
project_name, current_representation["parent"], fields=["parent"]
)
if version == -1:
new_version = get_last_version_by_subset_id(
Expand Down

0 comments on commit 6f2f599

Please sign in to comment.