diff --git a/hb_server/apps/wpm/serializers.py b/hb_server/apps/wpm/serializers.py index 9294ec4..fc6be42 100644 --- a/hb_server/apps/wpm/serializers.py +++ b/hb_server/apps/wpm/serializers.py @@ -95,7 +95,7 @@ class PickSerializer(serializers.Serializer): # 更新半成品表 wids = IProduct.objects.filter(pk__in=[x.id for x in iproducts]).values_list('wproduct', flat=True) wproducts = WProduct.objects.filter(pk__in=wids) - first_step = Step.objects.get(pk=sp.steps[0].id) + first_step = Step.objects.get(pk=sp.steps[0]['id']) wproducts.update(step=first_step, is_executed=False, act_state=WProduct.WPR_ACT_STATE_DOING, is_hidden=False, warehouse=None, subproduction_plan=sp, production_plan=sp.production_plan)