Prepopulate the match field
This commit is contained in:
parent
ddffc2c3d8
commit
742a2f92da
|
@ -136,6 +136,16 @@ class NotificationRuleData(object):
|
|||
self.validate_permissions()
|
||||
self.validate_schedule_fields()
|
||||
self.validate_time_fields()
|
||||
if self.object is not None:
|
||||
self.populate_matched()
|
||||
|
||||
def populate_matched(self):
|
||||
if self.object.match is None:
|
||||
self.object.match = {}
|
||||
for index in self.parsed["index"]:
|
||||
if index not in self.object.match:
|
||||
self.object.match[index] = False
|
||||
self.object.save()
|
||||
|
||||
def store_match(self, index, match):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue