fix: qm cal_count bug

This commit is contained in:
caoqianming 2025-01-13 17:21:39 +08:00
parent ced8692585
commit 77faee5d1a
1 changed files with 1 additions and 1 deletions

View File

@ -240,7 +240,7 @@ class FtestWork(CommonBDModel):
def cal_count(self):
self.count_notok = FtestworkDefect.objects.filter(
mlogb=self, defect__okcate=30).aggregate(total=Sum("count"))["total"] or 0
ftestwork=self, defect__okcate=30).aggregate(total=Sum("count"))["total"] or 0
self.count_ok = self.count - self.count_notok
if self.type2 == 20: #全检
self.count_sampling = self.count