feat: ftestwork belong_dept默认test_user 所在部门
This commit is contained in:
parent
ca2103db8e
commit
1caba24321
|
@ -34,5 +34,5 @@ class FtestWorkFilter(filters.FilterSet):
|
||||||
"mb": ["exact"],
|
"mb": ["exact"],
|
||||||
"batch": ["exact"],
|
"batch": ["exact"],
|
||||||
"type": ["exact"],
|
"type": ["exact"],
|
||||||
"type2": ["exact"],
|
"type2": ["exact"],
|
||||||
}
|
}
|
|
@ -96,6 +96,8 @@ class FtestWorkCreateUpdateSerializer(CustomModelSerializer):
|
||||||
attrs['batch'] = attrs['mb'].batch
|
attrs['batch'] = attrs['mb'].batch
|
||||||
else:
|
else:
|
||||||
raise ValidationError('请选择车间/仓库库存')
|
raise ValidationError('请选择车间/仓库库存')
|
||||||
|
if attrs['test_user']:
|
||||||
|
attrs['belong_dept'] = attrs['test_user'].belong_dept
|
||||||
return attrs
|
return attrs
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -110,3 +110,7 @@ class AnaViewSet(GenericViewSet):
|
||||||
|
|
||||||
return Response(ret)
|
return Response(ret)
|
||||||
|
|
||||||
|
perms_map = {}
|
||||||
|
@action(methods=['post'], detail=False, perms_map={'post': '*'}, serializer_class=Serializer)
|
||||||
|
def equip_last_mlog(self, request):
|
||||||
|
pass
|
||||||
|
|
Loading…
Reference in New Issue