From 34123681cf5bc0610210ce891db871e2a11a7a16 Mon Sep 17 00:00:00 2001 From: Nikhil <118773738+pablohashescobar@users.noreply.github.com> Date: Thu, 20 Jul 2023 14:18:06 +0530 Subject: [PATCH] chore: notification ordering (#1584) --- apiserver/plane/api/views/notification.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apiserver/plane/api/views/notification.py b/apiserver/plane/api/views/notification.py index e81fd2b5f..f0c8e05d5 100644 --- a/apiserver/plane/api/views/notification.py +++ b/apiserver/plane/api/views/notification.py @@ -30,7 +30,6 @@ class NotificationViewSet(BaseViewSet): def list(self, request, slug): try: - order_by = request.GET.get("order_by", "-created_at") snoozed = request.GET.get("snoozed", "false") archived = request.GET.get("archived", "false") read = request.GET.get("read", "true") @@ -40,7 +39,7 @@ class NotificationViewSet(BaseViewSet): notifications = Notification.objects.filter( workspace__slug=slug, receiver_id=request.user.id - ).order_by(order_by) + ).order_by("snoozed_till", "-created_at") # Filter for snoozed notifications if snoozed == "false":