From 6e84e708522ee4d0d5929551fe37e9642850abf0 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 16 Apr 2024 14:47:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=9F=E6=88=90envdata=E6=95=B0?= =?UTF-8?q?=E6=8D=AE2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/enp/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/enp/tasks.py b/apps/enp/tasks.py index ab8fcc63..9288b4b2 100644 --- a/apps/enp/tasks.py +++ b/apps/enp/tasks.py @@ -19,7 +19,7 @@ def generate_envdata(): for equip in equips: default_dict = {"equipment": equip, "timex": now, "running_state": 10} equip.running_state = 10 - equip.save() + equip.save(update_fields=["running_state"]) if equip.cate and equip.cate.code in ["cems", "aqms", "tsp"]: if equip.cate.code == "cems": dust_rtd = random.uniform(0.1, 0.3)