Skip to content

Commit 43434a1

Browse files
authored
Merge pull request #253 from PROCOLLAB-github/swagger-doc-fix
comments fix
2 parents 2447f33 + 2639d51 commit 43434a1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

chats/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ class DirectChatDetail(RetrieveAPIView):
8686

8787
def get(self, request, *args, **kwargs) -> Response:
8888
try:
89-
assert "_" in self.kwargs["id"], "pk must contain underscore"
89+
assert "_" in self.kwargs["id"], "processed id must contain underscore"
9090

9191
user1_id, user2_id = map(int, self.kwargs["id"].split("_"))
9292

9393
assert (
9494
request.user.id == user1_id or request.user.id == user2_id
95-
), "current user id is not present in pk"
95+
), "current user id is not present in raw id"
9696

9797
user1 = User.objects.get(pk=user1_id)
9898
user2 = User.objects.get(pk=user2_id)
@@ -117,7 +117,7 @@ def get(self, request, *args, **kwargs) -> Response:
117117
except ValueError:
118118
return Response(
119119
status=status.HTTP_400_BAD_REQUEST,
120-
data={"detail": "pk must contain two integers separated by underscore"},
120+
data={"detail": "processed id must contain two integers separated by underscore"},
121121
)
122122
except AssertionError as e:
123123
return Response(status=status.HTTP_400_BAD_REQUEST, data={"detail": str(e)})

0 commit comments

Comments
 (0)