diff --git a/apps/wpm/models.py b/apps/wpm/models.py index ec73d19a..d61b4c4d 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, 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):