alert edit including filters
This commit is contained in:
@@ -55,12 +55,12 @@ def create_alert(manager, rower, measured,period=7, emailalert=True,
|
||||
|
||||
|
||||
# update alert
|
||||
def alert_add_filters(alert,filter):
|
||||
def alert_add_filters(alert,filters):
|
||||
for f in alert.filter.all():
|
||||
alert.filter.remove(f)
|
||||
f.delete()
|
||||
|
||||
for f in filter:
|
||||
for f in filters:
|
||||
m = Condition(
|
||||
metric = f['metric'],
|
||||
value1 = f['value1'],
|
||||
|
||||
Reference in New Issue
Block a user