针对该组织的检查开始操作的bug

This commit is contained in:
caoqianming 2021-04-28 11:40:00 +08:00
parent b944e38335
commit 6e52e39adf
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ class InspectDeptViewSet(ListModelMixin, RetrieveModelMixin, GenericViewSet):
obj = self.get_object()
if obj.state == '待检查':
obj.state = '检查中'
obj.start_date = timezone.now()
obj.start_date = timezone.now().date()
obj.save()
return Response(InspectDeptSerializer(instance=obj).data, status=status.HTTP_200_OK)
return Response('状态错误', status=status.HTTP_400_BAD_REQUEST)