From 3d0536745a128164db0320aed3cd9b006a54d200 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 22 Apr 2025 09:56:23 +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=962?= 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 d61b4c4d..e1701f16 100644 --- a/apps/wpm/models.py +++ b/apps/wpm/models.py @@ -120,7 +120,7 @@ class WMaterial(CommonBDModel): @property def count_working(self): - return Mlogb.objects.filter(wm_in=self, submit_time__isnull=True).aggregate(count=Sum('count_use'))['count'] or 0 + return Mlogb.objects.filter(wm_in=self, mlog__submit_time__isnull=True).aggregate(count=Sum('count_use'))['count'] or 0 @classmethod def mat_in_qs(cls, mtask: Mtask, qs=None):