From 28e5b83896649d9c9e426045cff77b715ca19bdf Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 12 Sep 2024 11:31:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20wmaterial=20=E8=BF=94=E5=9B=9Ecount=5Fwo?= =?UTF-8?q?rking3?= 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 61985ea9..34b91399 100644 --- a/apps/wpm/models.py +++ b/apps/wpm/models.py @@ -109,7 +109,7 @@ class WMaterial(CommonBDModel): @property def count_working(self): - return int(Mlogb.objects.filter(wm_in=self, mlog__work_end_time__isnull=True).aggregate(count=Sum('count_use'))['count']) or 0 + return int(Mlogb.objects.filter(wm_in=self, mlog__work_end_time__isnull=True).aggregate(count=Sum('count_use'))['count'] or 0) class Fmlog(CommonADModel): route = models.ForeignKey(Route, verbose_name='生产路线', on_delete=models.SET_NULL, null=True, blank=True)