From 8b98c56ee87959a36a82de575d888de1f89447d1 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Mon, 23 Jun 2025 09:14:42 +0200 Subject: [PATCH] Handles missing data keys safely Uses `get` method to safely access optional entities in the data dictionary, preventing potential KeyError when keys are absent. --- client/ayon_core/hooks/pre_global_host_data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/hooks/pre_global_host_data.py b/client/ayon_core/hooks/pre_global_host_data.py index 23f725901c..83c4118136 100644 --- a/client/ayon_core/hooks/pre_global_host_data.py +++ b/client/ayon_core/hooks/pre_global_host_data.py @@ -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"],