fix: shutdown_or_startup bug
This commit is contained in:
parent
a7b53bce2e
commit
e4c49918ae
|
@ -82,7 +82,7 @@ def shutdown_or_startup(mplog: MpLog):
|
||||||
mpoint = mplog.mpoint
|
mpoint = mplog.mpoint
|
||||||
mgroup = mpoint.mgroup
|
mgroup = mpoint.mgroup
|
||||||
now = timezone.now()
|
now = timezone.now()
|
||||||
if mplog.tag_val == 1 and mgroup.is_running is False:
|
if mplog.tag_val == 1 and mgroup.is_runing is False:
|
||||||
# 从停到开
|
# 从停到开
|
||||||
stlog = StLog.objects.filter(mgroup=mgroup).order_by('start_time').last()
|
stlog = StLog.objects.filter(mgroup=mgroup).order_by('start_time').last()
|
||||||
stlog.end_time = now
|
stlog.end_time = now
|
||||||
|
|
Loading…
Reference in New Issue