mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
fixed status name check
This commit is contained in:
parent
bce9fd7572
commit
df1d3f323d
1 changed files with 11 additions and 2 deletions
|
|
@ -87,6 +87,9 @@ class TaskStatusToParent(BaseEvent):
|
|||
|
||||
filtered_entities.append(entity_info)
|
||||
|
||||
if not filtered_entities:
|
||||
return
|
||||
|
||||
status_ids = [
|
||||
entity_info["changes"]["statusid"]["new"]
|
||||
for entity_info in filtered_entities
|
||||
|
|
@ -292,12 +295,18 @@ class TaskStatusToParent(BaseEvent):
|
|||
"\"{}\" Couldn't change status to \"{}\"."
|
||||
" Status is not available for entity type \"{}\"."
|
||||
).format(
|
||||
new_status_name, ent_path, parent_entity.entity_type
|
||||
ent_path, new_status_name, parent_entity.entity_type
|
||||
))
|
||||
continue
|
||||
|
||||
current_status_name = parent_entity["status"]["name"]
|
||||
# Do nothing if status is already set
|
||||
if new_status["name"].lower() == new_status_name:
|
||||
if new_status["name"] == current_status_name:
|
||||
self.log.debug(
|
||||
"\"{}\" Status \"{}\" already set.".format(
|
||||
ent_path, current_status_name
|
||||
)
|
||||
)
|
||||
continue
|
||||
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue