From ab8f3afd48ed41a59975d2dd13254a2147951e54 Mon Sep 17 00:00:00 2001 From: sm4640 Date: Fri, 2 May 2025 22:15:54 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Fix:=20[#41]=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=20=EA=B4=80=EB=A0=A8=20=EC=BD=94=EB=93=9C=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=EB=B0=8F=2030=EC=9D=BC=20=EC=9D=B4=EC=A0=84=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95(lt=20->=20gt)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- users/services.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/users/services.py b/users/services.py index 9ea3ba6..8dee258 100644 --- a/users/services.py +++ b/users/services.py @@ -16,22 +16,17 @@ class CheckUserFieldDuplicateService: @staticmethod def check_custom_url_duplicate(): pass - -# 알림 관련 서비스 로직 -class NotifiationService: - @staticmethod - def set_content_by_type(): - pass + class UserToNotificationService: @staticmethod def get_new_notification_count(user: User): - return user.notifications.filter(created_at__lt=thirty_days_ago, is_read=False).count() + return user.notifications.filter(created_at__gt=thirty_days_ago, is_read=False).count() @staticmethod def get_all_notification(user: User): - return user.notifications.filter(created_at__lt=thirty_days_ago) + return user.notifications.filter(created_at__gt=thirty_days_ago) # 유저 -> 포트폴리오 관련 서비스 로직 @@ -82,4 +77,3 @@ class UserToProjectService: @staticmethod def get_scrap_project(user: User): return user.scrapped_projects.filter(is_published=True) -