fix: mlogbw删除bug
This commit is contained in:
parent
e52b894603
commit
8bd3e120df
|
@ -797,7 +797,7 @@ class MlogbwViewSet(CustomModelViewSet):
|
|||
@transaction.atomic
|
||||
def perform_destroy(self, instance:Mlogbw):
|
||||
mlogb:Mlogb = instance.mlogb
|
||||
if mlogb.material_out is not None and mlogb.wpr is not None:
|
||||
if mlogb.material_out is not None and instance.wpr is not None:
|
||||
raise ParseError("不能删除该产出明细")
|
||||
|
||||
ftest = instance.ftest
|
||||
|
@ -805,7 +805,7 @@ class MlogbwViewSet(CustomModelViewSet):
|
|||
ftest.delete()
|
||||
instance.delete()
|
||||
Mlogbw.cal_count_notok(mlogb)
|
||||
|
||||
|
||||
# 如果是输入且输出追踪到个,需同步删除
|
||||
material_in: Material = mlogb.material_in
|
||||
if material_in is not None:
|
||||
|
|
Loading…
Reference in New Issue