Skip to content
Snippets Groups Projects
Commit 958e1291 authored by Brian Moe's avatar Brian Moe
Browse files

Fixed bug where throttle can effect safe methods.

parent f346bea4
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,10 @@ class PostOrPutUserRateThrottle(UserRateThrottle):
This is mostly copied from the Rest Framework's SimpleRateThrottle
except we now pass the request to throttle_success
"""
# We don't want to throttle any safe methods
if request.method not in ['POST', 'PUT']:
return True
if self.rate is None:
return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment