mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Handles missing data keys safely
Uses `get` method to safely access optional entities in the data dictionary, preventing potential KeyError when keys are absent.
This commit is contained in:
parent
b61d36867a
commit
8b98c56ee8
1 changed files with 2 additions and 2 deletions
|
|
@ -32,8 +32,8 @@ class GlobalHostDataHook(PreLaunchHook):
|
|||
"app": app,
|
||||
|
||||
"project_entity": self.data["project_entity"],
|
||||
"folder_entity": self.data["folder_entity"],
|
||||
"task_entity": self.data["task_entity"],
|
||||
"folder_entity": self.data.get("folder_entity"),
|
||||
"task_entity": self.data.get("task_entity"),
|
||||
|
||||
"anatomy": self.data["anatomy"],
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue