fix: handover拆批请选择车间库存2

This commit is contained in:
caoqianming 2025-04-14 15:29:36 +08:00
parent 22b6b1305f
commit c791bde5be
1 changed files with 1 additions and 1 deletions

View File

@ -967,7 +967,7 @@ class HandoverSerializer(CustomModelSerializer):
wm:WMaterial = attrs.get('wm', None)
handoverb = attrs.get('handoverb', [])
if wm:
if wm and not handoverb:
attrs['handoverb'] = [{"wm": wm, "count": attrs["count"] }]
handoverb = attrs['handoverb']
attrs['batch'] = wm.batch