查看产品大工序bug
This commit is contained in:
parent
38e7cf2ee2
commit
bbf5b2cbc9
|
|
@ -17,8 +17,8 @@ class MaterialDetailSerializer(serializers.ModelSerializer):
|
|||
fields = '__all__'
|
||||
|
||||
def get_processes_(self, obj):
|
||||
steps = UsedStep.objects.filter(subproduction__product=obj)
|
||||
objs = Process.objects.filter(step_process__in=steps).order_by('number')
|
||||
steps = UsedStep.objects.filter(subproduction__product=obj).values_list('step', flat=True)
|
||||
objs = Process.objects.filter(step_process__id__in=steps).order_by('number')
|
||||
return ProcessSimpleSerializer(instance=objs, many=True).data
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue