针对该组织的检查开始操作的bug
This commit is contained in:
parent
b944e38335
commit
6e52e39adf
|
|
@ -193,7 +193,7 @@ class InspectDeptViewSet(ListModelMixin, RetrieveModelMixin, GenericViewSet):
|
||||||
obj = self.get_object()
|
obj = self.get_object()
|
||||||
if obj.state == '待检查':
|
if obj.state == '待检查':
|
||||||
obj.state = '检查中'
|
obj.state = '检查中'
|
||||||
obj.start_date = timezone.now()
|
obj.start_date = timezone.now().date()
|
||||||
obj.save()
|
obj.save()
|
||||||
return Response(InspectDeptSerializer(instance=obj).data, status=status.HTTP_200_OK)
|
return Response(InspectDeptSerializer(instance=obj).data, status=status.HTTP_200_OK)
|
||||||
return Response('状态错误', status=status.HTTP_400_BAD_REQUEST)
|
return Response('状态错误', status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue