From e47c853578bb1221c4d8e2094b501d326feb5eaa Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 22 Apr 2025 09:34:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20count=5Fworking=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/wpm/models.py b/apps/wpm/models.py index f192aa96..d99c5a35 100644 --- a/apps/wpm/models.py +++ b/apps/wpm/models.py @@ -128,7 +128,7 @@ class WMaterial(CommonBDModel): @property def count_working(self): - return Mlogb.objects.filter(wm_in=self, mlog__work_end_time__isnull=True).aggregate(count=Sum('count_use'))['count'] or 0 + return Mlogb.objects.filter(wm_in=self, submit_time__isnull=True).aggregate(count=Sum('count_use'))['count'] or 0 @classmethod def mat_in_qs(cls, mtask: Mtask, qs=None):