aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/permissions.py
diff options
context:
space:
mode:
authorTom Christie2013-04-23 11:31:38 +0100
committerTom Christie2013-04-23 11:31:38 +0100
commit4bf1a09baeb885863e6028b97c2d51b26fb18534 (patch)
tree1ccdcf4b09f248c19b257a731ea4e25b5d2e10eb /rest_framework/permissions.py
parentbcf4cb2b4e2fdf10b0df01ece1aa8ce9dc97285a (diff)
downloaddjango-rest-framework-4bf1a09baeb885863e6028b97c2d51b26fb18534.tar.bz2
Ensure implementation of reverse relations in 'fields' is backwards compatible
Diffstat (limited to 'rest_framework/permissions.py')
-rw-r--r--rest_framework/permissions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/permissions.py b/rest_framework/permissions.py
index ae895f39..2aa45c71 100644
--- a/rest_framework/permissions.py
+++ b/rest_framework/permissions.py
@@ -25,7 +25,7 @@ class BasePermission(object):
"""
Return `True` if permission is granted, `False` otherwise.
"""
- if len(inspect.getargspec(self.has_permission)[0]) == 4:
+ if len(inspect.getargspec(self.has_permission).args) == 4:
warnings.warn('The `obj` argument in `has_permission` is due to be deprecated. '
'Use `has_object_permission()` instead for object permissions.',
PendingDeprecationWarning, stacklevel=2)