fix: cal_count_notok 是一个类方法
This commit is contained in:
parent
12416a4f61
commit
278e55c08a
|
@ -383,7 +383,7 @@ class Mlogbw(BaseModel):
|
|||
note = models.TextField('备注', null=True, blank=True)
|
||||
|
||||
@classmethod
|
||||
def cal_count_notok(mlogb: Mlog):
|
||||
def cal_count_notok(cls, mlogb: Mlog):
|
||||
count = Mlogbw.objects.filter(mlogb=mlogb).count()
|
||||
if mlogb.material_in:
|
||||
mlogb.count_use = count
|
||||
|
|
Loading…
Reference in New Issue