set default data_key for notification targets if not provided
This commit is contained in:
parent
88163cad42
commit
c2fa066669
1 changed files with 1 additions and 2 deletions
|
|
@ -292,8 +292,7 @@ class Notification(metaclass=Singleton):
|
||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
|
|
||||||
if "data_key" not in target["request"]:
|
if "data_key" not in target["request"]:
|
||||||
msg = "Invalid notification target. No data_key found."
|
target["request"]["data_key"] = "data"
|
||||||
raise ValueError(msg)
|
|
||||||
|
|
||||||
if "method" in target["request"] and target["request"]["method"].upper() not in ["POST", "PUT"]:
|
if "method" in target["request"] and target["request"]["method"].upper() not in ["POST", "PUT"]:
|
||||||
msg = "Invalid notification target. Invalid method found."
|
msg = "Invalid notification target. Invalid method found."
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue