diff --git a/django_project/gap_api/mixins/rate_limiter.py b/django_project/gap_api/mixins/rate_limiter.py index f07e0b8..283e2bb 100644 --- a/django_project/gap_api/mixins/rate_limiter.py +++ b/django_project/gap_api/mixins/rate_limiter.py @@ -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']