aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/throttling.py
diff options
context:
space:
mode:
authorTom Christie2015-02-09 20:43:50 +0000
committerTom Christie2015-02-09 20:43:50 +0000
commitfbb21caaaa01033bbd34b0c63ab48243ffb6310e (patch)
tree5d0fdee18c9bf02733b1df913c4cddd9e3e86da7 /rest_framework/throttling.py
parent407480b4840990ff17f9a33b293cfcf15bb6f7c5 (diff)
parent7b639c0cd0676172cc8502e833f5b708f39f9a83 (diff)
downloaddjango-rest-framework-fbb21caaaa01033bbd34b0c63ab48243ffb6310e.tar.bz2
Merge master
Diffstat (limited to 'rest_framework/throttling.py')
-rw-r--r--rest_framework/throttling.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/throttling.py b/rest_framework/throttling.py
index 0f10136d..261fc246 100644
--- a/rest_framework/throttling.py
+++ b/rest_framework/throttling.py
@@ -191,7 +191,7 @@ class UserRateThrottle(SimpleRateThrottle):
def get_cache_key(self, request, view):
if request.user.is_authenticated():
- ident = request.user.id
+ ident = request.user.pk
else:
ident = self.get_ident(request)
@@ -239,7 +239,7 @@ class ScopedRateThrottle(SimpleRateThrottle):
with the '.throttle_scope` property of the view.
"""
if request.user.is_authenticated():
- ident = request.user.id
+ ident = request.user.pk
else:
ident = self.get_ident(request)