From c2fa0666692cd61b2b3e3d145306f76d2bb5fc35 Mon Sep 17 00:00:00 2001 From: arabcoders Date: Wed, 9 Apr 2025 19:36:49 +0300 Subject: [PATCH] set default data_key for notification targets if not provided --- app/library/Notifications.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/library/Notifications.py b/app/library/Notifications.py index 91923e44..a1a7f6f4 100644 --- a/app/library/Notifications.py +++ b/app/library/Notifications.py @@ -292,8 +292,7 @@ class Notification(metaclass=Singleton): raise ValueError(msg) if "data_key" not in target["request"]: - msg = "Invalid notification target. No data_key found." - raise ValueError(msg) + target["request"]["data_key"] = "data" if "method" in target["request"] and target["request"]["method"].upper() not in ["POST", "PUT"]: msg = "Invalid notification target. Invalid method found."