fix: enm_alarm bug

This commit is contained in:
caoqianming 2023-09-06 22:40:42 +08:00
parent e3449b9b89
commit 95380fa826
1 changed files with 1 additions and 1 deletions

View File

@ -634,7 +634,7 @@ def enm_alarm(year_s: int, month_s: int, day_s: int):
from apps.mtm.models import Goal
from apps.ecm.service import notify_event
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:
mgroups = Mgroup.objects.filter(name=item[0])
for mgroup in mgroups: