feat: get_qct接口进行校验
This commit is contained in:
parent
4cd4ba3c9d
commit
ad5d8db283
|
@ -60,8 +60,10 @@ class QctViewSet(CustomModelViewSet):
|
|||
|
||||
获取检验模板
|
||||
"""
|
||||
data = request.data
|
||||
qct = Qct.get(data["material"], data["tag"])
|
||||
sr = QctGetSerializer(data=request.data)
|
||||
sr.is_valid(raise_exception=True)
|
||||
vdata = sr.validated_data
|
||||
qct = Qct.get(vdata["material"], vdata["tag"])
|
||||
return Response(QctDetailSerializer(instance=qct).data)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue