make timer method static one

This commit is contained in:
Łukasz Skarżyński 2021-04-23 10:06:07 +02:00
parent 8812394ed8
commit 130dd0ec09

View File

@ -60,7 +60,7 @@ class SimpleRateThrottle(BaseThrottle):
Previous request information used for throttling is stored in the cache.
"""
cache = default_cache
timer = time.time
timer = staticmethod(time.time)
cache_format = 'throttle_%(scope)s_%(ident)s'
scope = None
THROTTLE_RATES = api_settings.DEFAULT_THROTTLE_RATES