报废操作bug
This commit is contained in:
parent
b0dbcc2499
commit
5fed3d5ad8
|
@ -343,7 +343,7 @@ class WProductViewSet(ListModelMixin, GenericViewSet):
|
|||
vdata = serializer.validated_data
|
||||
if obj.act_state == WProduct.WPR_ACT_STATE_NOTOK:
|
||||
pass
|
||||
elif obj.step.process == 1: # 如果是冷加工可直接报废
|
||||
elif obj.step.process.id == 1: # 如果是冷加工可直接报废
|
||||
if vdata.get('scrap_reason', None):
|
||||
obj.scrap_reason = vdata['scrap_reason']
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue