Skip to content

Commit

Permalink
fix config empty
Browse files Browse the repository at this point in the history
  • Loading branch information
danangmassandy committed Oct 30, 2024
1 parent fbcd66f commit 6262157
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions django_project/gap_api/mixins/rate_limiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ def _fetch_rate_limit(self, user):
if user does not have config, then it will use the global config.
"""
config = APIRateLimiter.get_config(user)

rate_limits = {}
if config is None:
return rate_limits

if config['minute'] != -1:
rate_limits[RateLimitKey.RATE_LIMIT_MINUTE_KEY] = config['minute']
Expand Down

0 comments on commit 6262157

Please sign in to comment.