From 3ae237c1e93c8bf3a8b8c12183a4962b4b42c1c2 Mon Sep 17 00:00:00 2001 From: Suprabath <34211797+suprabathk@users.noreply.github.com> Date: Fri, 1 Sep 2023 18:21:44 +0530 Subject: [PATCH] Changed chats list order to descending (#279) --- ayushma/views/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ayushma/views/chat.py b/ayushma/views/chat.py index b358ff90..99d4412b 100644 --- a/ayushma/views/chat.py +++ b/ayushma/views/chat.py @@ -51,7 +51,7 @@ def get_queryset(self): if user.is_superuser and self.action == "list_all": return queryset - return queryset.filter(user=user) + return queryset.filter(user=user).order_by("-created_at") def perform_create(self, serializer): project_id = self.kwargs["project_external_id"]