wpm post bug
This commit is contained in:
parent
0f229df8f0
commit
537fda2e86
|
@ -101,7 +101,7 @@ class OperationDetailSerializer(serializers.ModelSerializer):
|
|||
fields = '__all__'
|
||||
|
||||
def get_wproducts_(self, obj):
|
||||
return list(WProduct.objects.filter(id__in=obj.wproducts_).values('id', 'number'))
|
||||
return list(WProduct.objects.filter(id__in=obj.wproducts).values('id', 'number'))
|
||||
|
||||
class OperationListSerializer(serializers.ModelSerializer):
|
||||
create_by_ = UserSimpleSerializer(source='create_by', read_only=True)
|
||||
|
|
|
@ -145,7 +145,7 @@ class DoFormSubmit(CreateAPIView, GenericAPIView):
|
|||
action_obj.p_state = vdata['step']
|
||||
if 'wproducts' in data and data['wproducts']:
|
||||
action_obj.wproducts = data['wproducts']
|
||||
action_obj.m_state = vdata[0].m_state
|
||||
action_obj.m_state = vdata['wproducts'][0].m_state
|
||||
action_obj.remark = vdata.get('remark', '') # 操作备注
|
||||
action_obj.create_by = request.user
|
||||
action_obj.save()
|
||||
|
|
Loading…
Reference in New Issue