From e92e61326f9cb72e132ffead348af448012e39db Mon Sep 17 00:00:00 2001 From: Stan Girard Date: Mon, 22 Jan 2024 12:09:22 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20limits=20(#2058)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit now monthly and better reading database # Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate): --- backend/models/databases/supabase/user_usage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/models/databases/supabase/user_usage.py b/backend/models/databases/supabase/user_usage.py index f88800ea5..b62aa1e0d 100644 --- a/backend/models/databases/supabase/user_usage.py +++ b/backend/models/databases/supabase/user_usage.py @@ -233,7 +233,7 @@ class UserUsage(Repository): """ Fetch the user request count from the database """ - date_30_days_ago = datetime.now() - timedelta(days=30) + date_30_days_ago = (datetime.now() - timedelta(days=30)).strftime("%Y%m%d") response = ( self.db.from_("user_daily_usage")