From f5c42d550e805cecbf6105286d38f2236c34d5b3 Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Thu, 23 Nov 2023 18:36:52 +0530 Subject: [PATCH] dev: state get object --- apiserver/plane/api/views/state.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apiserver/plane/api/views/state.py b/apiserver/plane/api/views/state.py index 99b3a943f..679c12964 100644 --- a/apiserver/plane/api/views/state.py +++ b/apiserver/plane/api/views/state.py @@ -79,7 +79,7 @@ class StateAPIEndpoint(BaseAPIView): return Response(status=status.HTTP_204_NO_CONTENT) def patch(self, request, slug, project_id, state_id=None): - state = State.objects.filter(workspace__slug=slug, project_id=project_id, pk=state_id) + state = State.objects.get(workspace__slug=slug, project_id=project_id, pk=state_id) serializer = StateSerializer(state, data=request.data, partial=True) if serializer.is_valid(): serializer.save()