From 0c5034683cc9c0ff802481d2db52444be71e3cb3 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 17 Dec 2025 09:25:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20update=5Fmb=5Fitem=E6=97=B6=E8=80=83?= =?UTF-8?q?=E8=99=91=E6=A3=80=E9=AA=8C=E7=9A=84=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/inm/services.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/inm/services.py b/apps/inm/services.py index dba22bff..c0046a9a 100644 --- a/apps/inm/services.py +++ b/apps/inm/services.py @@ -373,7 +373,10 @@ class InmService: ddict["material_ofrom"] = i.material if field == "count": - count_change = i.count - i.count_notok + if i.test_date is not None: + count_change = i.count - i.count_notok + else: + count_change = i.count elif field == "count_notok": count_change = getattr(i, field) else: