mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Refactor code to handle missing "representations" key in instance data
The code change modifies the `ExtractThumbnail` class in `extract_thumbnail.py`. It updates the loop that iterates over representations to handle cases where the "representations" key is missing from the instance data. This change ensures that cleanup occurs for representations with both "delete" and "need_thumbnail" tags.
This commit is contained in:
parent
839963915e
commit
c4570200ff
1 changed files with 1 additions and 1 deletions
|
|
@ -56,7 +56,7 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
|
|||
|
||||
# Make sure cleanup happens to representations which are having both
|
||||
# tags `delete` and `need_thumbnail`
|
||||
for repre in tuple(instance.data["representations"]):
|
||||
for repre in tuple(instance.data.get("representations", [])):
|
||||
tags = repre.get("tags") or []
|
||||
# skip representations which are going to be published on farm
|
||||
if "publish_on_farm" in tags:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue