fix email/sms toggle alert for eventlogs
@@ -110,7 +110,13 @@ class GetUpdateDeleteCheck(APIView):
# set event id to 0 if wildcard because it needs to be an integer field for db
# will be ignored anyway by the agent when doing wildcard check
- if check.check_type == "eventlog" and request.data["event_id_is_wildcard"]:
+ if check.check_type == "eventlog":
+ try:
+ request.data["event_id_is_wildcard"]
+ except KeyError:
+ pass
+ else:
+ if request.data["event_id_is_wildcard"]:
if check.agent.not_supported(version_added="0.10.2"):
return notify_error(
{
