From e7f4bd9cc60aa3ad230b31c3918df1f2043d6942 Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Sun, 12 Dec 2021 23:22:13 +0100 Subject: add grups views and modify info auth view --- chat_api/models.py | 2 +- chat_api/views.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'chat_api') diff --git a/chat_api/models.py b/chat_api/models.py index 4c370fc..4b354f4 100644 --- a/chat_api/models.py +++ b/chat_api/models.py @@ -24,4 +24,4 @@ class Gm(models.Model): create_date = models.DateTimeField(auto_now=True) def __str__(self): - return str(self.sender) \ No newline at end of file + return str(self.sender) diff --git a/chat_api/views.py b/chat_api/views.py index 6d161c1..3ea0e54 100644 --- a/chat_api/views.py +++ b/chat_api/views.py @@ -63,6 +63,7 @@ class GroupDetailView(generics.RetrieveUpdateDestroyAPIView): def update(self, request, *args, **kwargs): request.data['owner'] = request.user.pk set_users(request) + return super().update(request, *args, **kwargs) def retrieve(self, request, pk): @@ -112,4 +113,4 @@ class GmsView(APIView): serializer.is_valid(raise_exception=True) serializer.save() - return Response(serializer.data) \ No newline at end of file + return Response(serializer.data) -- cgit v1.2.3