From 008cea9fd1a5bd12e8659067d464bd98ad40c52b Mon Sep 17 00:00:00 2001 From: bluebamus Date: Tue, 27 Aug 2024 19:23:39 +0900 Subject: [PATCH] update static code --- custom_middlewares/common/statistics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_middlewares/common/statistics.py b/custom_middlewares/common/statistics.py index d41301d..7fe21db 100644 --- a/custom_middlewares/common/statistics.py +++ b/custom_middlewares/common/statistics.py @@ -15,7 +15,7 @@ def __init__(self, get_response): self.get_response = get_response def stats(self, os_info): - today = timezone.now().date() + today = timezone.now().date().day with transaction.atomic(): # count = ConnectionMethodStats.objects.filter( # created_at__day=timezone.now().date().day @@ -57,7 +57,7 @@ def __init__(self, get_response): def __call__(self, request): if "admin" not in request.path: with transaction.atomic(): - today = timezone.now().date() + today = timezone.now().date().day # 오늘 날짜의 통계 가져오기 stats, created = ConnectionHardwareStats.objects.get_or_create( created_at__date=today