mirror of
https://github.com/StanGirard/quivr.git
synced 2024-11-23 12:26:03 +03:00
fix: 🐛 requests
equals 0
This commit is contained in:
parent
e15d0f8774
commit
09159a2ba1
@ -246,7 +246,7 @@ class UserUsage(Repository):
|
||||
|
||||
if response and len(response) > 0:
|
||||
return response[0]["daily_requests_count"]
|
||||
return None
|
||||
return 0
|
||||
|
||||
def increment_user_request_count(
|
||||
self, user_id, date, current_requests_count: int, number: int = 1
|
||||
|
@ -56,7 +56,7 @@ class UserUsage(UserIdentity):
|
||||
self.id, date
|
||||
)
|
||||
|
||||
if current_requests_count is None:
|
||||
if current_requests_count == 0:
|
||||
if self.email is None:
|
||||
raise ValueError("User Email should be defined for daily usage table")
|
||||
self.supabase_db.create_user_daily_usage(
|
||||
|
Loading…
Reference in New Issue
Block a user