✏️ Fix: [#41] 알림 생성 역순으로 출력

This commit is contained in:
sm4640
2025-05-02 22:36:18 +09:00
parent 3ba1f4dcf2
commit ad5cc68274

View File

@@ -20,8 +20,7 @@ class NotificationReadViewSet(ReadOnlyModelViewSet):
# 30일 이전 알림만 가져옴 # 30일 이전 알림만 가져옴
def get_queryset(self): def get_queryset(self):
qs = UserToNotificationService.get_all_notification(self.request.user) qs = UserToNotificationService.get_all_notification(self.request.user)
print(qs) return qs.order_by('-created_at').select_related(
return qs.select_related(
'project_invitation__project', 'project_invitation__project',
'project_invitation__from_user', 'project_invitation__from_user',
) )