fix: mlogbw delete bug
This commit is contained in:
parent
90e0e7ad3b
commit
d847b84fd8
|
@ -800,10 +800,9 @@ class MlogbwViewSet(CustomModelViewSet):
|
|||
if mlogb.material_out is not None and mlogb.wpr is not None:
|
||||
raise ParseError("不能删除该产出明细")
|
||||
ftest = instance.ftest
|
||||
instance.delete()
|
||||
if ftest:
|
||||
ftest.delete()
|
||||
Mlogbw.cal_count_notok(mlogb)
|
||||
|
||||
# 如果是输入且输出追踪到个,需同步删除
|
||||
material_in: Material = mlogb.material_in
|
||||
if material_in is not None:
|
||||
|
@ -812,4 +811,6 @@ class MlogbwViewSet(CustomModelViewSet):
|
|||
if instance.mlogbw_to:
|
||||
instance.mlogbw_to.delete()
|
||||
instance.delete()
|
||||
Mlogbw.cal_count_notok(mlogb)
|
||||
Mlogbw.cal_count_notok(instance.mlogbw_to.mlogb)
|
||||
instance.delete()
|
||||
Mlogbw.cal_count_notok(mlogb)
|
||||
|
|
Loading…
Reference in New Issue