fix: enm_alarm bug
This commit is contained in:
parent
e3449b9b89
commit
95380fa826
|
|
@ -634,7 +634,7 @@ def enm_alarm(year_s: int, month_s: int, day_s: int):
|
||||||
from apps.mtm.models import Goal
|
from apps.mtm.models import Goal
|
||||||
from apps.ecm.service import notify_event
|
from apps.ecm.service import notify_event
|
||||||
now = timezone.now()
|
now = timezone.now()
|
||||||
event_cate, _ = EventCate.objects.get_or_create(code='consume_exceed', default={'name': '能耗超过目标值', 'code': 'consume_exceed', 'triger': 30})
|
event_cate, _ = EventCate.objects.get_or_create(code='consume_exceed', defaults={'name': '能耗超过目标值', 'code': 'consume_exceed', 'triger': 30})
|
||||||
for item in enm_alarms_list:
|
for item in enm_alarms_list:
|
||||||
mgroups = Mgroup.objects.filter(name=item[0])
|
mgroups = Mgroup.objects.filter(name=item[0])
|
||||||
for mgroup in mgroups:
|
for mgroup in mgroups:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue