Store dict in match field if empty

This commit is contained in:
Mark Veidemanis 2023-01-16 00:20:40 +00:00
parent 9de1787de6
commit f5e371bf5c
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 2 additions and 0 deletions

View File

@ -159,6 +159,8 @@ class NotificationRuleData(object):
Get a match result for an index. Get a match result for an index.
""" """
if self.object.match is None: if self.object.match is None:
self.object.match = {}
self.object.save()
return None return None
if not isinstance(self.object.match, dict): if not isinstance(self.object.match, dict):
return None return None