Skip to content

Commit

Permalink
fix tests failing
Browse files Browse the repository at this point in the history
  • Loading branch information
KamilPawel authored and KamilPawel committed Sep 18, 2023
1 parent f78650d commit a0c5e59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion portal/helpers/ratelimit.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def get_usage(request, group=None, fn=None, key=None, rate=None, method=ALL, inc

cache_name = getattr(settings, "RATELIMIT_USE_CACHE", "default")
cache = caches[cache_name]
cache_key = _make_cache_key(group, window, rate, request.session.get("auth-username", ""), method)
cache_key = _make_cache_key(group, window, rate, value or request.session.get("auth-username", ""), method)

count = None
added = cache.add(cache_key, initial_value, period + EXPIRATION_FUDGE)
Expand Down

0 comments on commit a0c5e59

Please sign in to comment.