aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
authorTom Christie2015-01-27 09:09:59 +0000
committerTom Christie2015-01-27 09:09:59 +0000
commit107198af943aadba686ceeac0976b09366983007 (patch)
treec7635b0ec5fcc54b54469b8a068a510bc4015d82 /rest_framework
parent8f25c0c53c24c88afc86d99bbb3ca4edc3a4e0a2 (diff)
parentbf58c1265ddf06deb435d049fae01ed324a310e0 (diff)
downloaddjango-rest-framework-107198af943aadba686ceeac0976b09366983007.tar.bz2
Merge pull request #2456 from brandoncazander/version-3.1
Fix AttributeError on BrowsableAPI when checking for API version
Diffstat (limited to 'rest_framework')
-rw-r--r--rest_framework/request.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/rest_framework/request.py b/rest_framework/request.py
index cfbbdecc..ce2fcb47 100644
--- a/rest_framework/request.py
+++ b/rest_framework/request.py
@@ -107,6 +107,8 @@ def clone_request(request, method):
ret.accepted_renderer = request.accepted_renderer
if hasattr(request, 'accepted_media_type'):
ret.accepted_media_type = request.accepted_media_type
+ if hasattr(request, 'version'):
+ ret.version = request.version
return ret