From f8383bc6a314ce52c29227391fc0146728df7b7b Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Wed, 22 Jan 2025 13:59:44 +0000 Subject: [PATCH] method renaming --- src/db/user_state.py | 2 +- src/endpoints/sheet.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/db/user_state.py b/src/db/user_state.py index afcb042..691574a 100644 --- a/src/db/user_state.py +++ b/src/db/user_state.py @@ -62,7 +62,7 @@ class UserState: def in_group(self, group_id: str) -> bool: return group_id in self.user_groups_names - def has_quota_sheet(self) -> bool: + def has_quota_monthly_sheets(self) -> bool: """ checks if a user has reached their sheet quota """ diff --git a/src/endpoints/sheet.py b/src/endpoints/sheet.py index a37ccb2..263966a 100644 --- a/src/endpoints/sheet.py +++ b/src/endpoints/sheet.py @@ -24,7 +24,7 @@ def create_sheet( if not user.in_group(sheet.group_id): raise HTTPException(status_code=403, detail="User does not have access to this group.") - if not user.has_quota_sheet(): + if not user.has_quota_monthly_sheets(): raise HTTPException(status_code=429, detail="User has reached their sheet quota.") if not user.is_sheet_frequency_allowed(sheet.frequency):