Skip to content

Commit

Permalink
renaming and missing key case handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Tilix4 committed Dec 9, 2022
1 parent cf8560c commit 8a4fe16
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions openpype/client/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def get_subset_families(project_name, subset_ids=None):
return set()


def match_subset_id(project_name, task_name, family, asset_doc):
def get_matching_subset_id(project_name, task_name, family, asset_doc):
"""Match subset ID for given project, task and family.
Args:
Expand Down Expand Up @@ -1094,7 +1094,8 @@ def get_representation_by_task(project_name, task_name, version_doc):
for representation in get_representations(
project_name, version_ids=[version_doc["_id"]]
)
if representation["context"]["task"]["name"] == task_name
if representation["context"].get("task", {}).get("name")
== task_name
),
None,
)
Expand Down

0 comments on commit 8a4fe16

Please sign in to comment.