Skip to content

Commit 8348534

Browse files
committed
Hot fix comment cutoff_date
1 parent f129387 commit 8348534

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rating_api/routes/comment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async def create_comment(lecturer_id: int, comment_info: CommentPost, user=Depen
4949
# Определяем дату, до которой учитываем комментарии для проверки общего лимита.
5050
cutoff_date_total = datetime.datetime(
5151
now.year + (now.month - settings.COMMENT_FREQUENCY_IN_MONTH) // 12,
52-
(now.month - settings.COMMENT_FREQUENCY_IN_MONTH) % 12,
52+
(now.month - settings.COMMENT_FREQUENCY_IN_MONTH - 1) % 12 + 1,
5353
1,
5454
)
5555
total_user_comments_count = (

0 commit comments

Comments
 (0)