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

General: Fix query function in update logic #3468

Merged
merged 2 commits into from
Jul 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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