mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
Fixed action_map being pulled from wrong object
This commit is contained in:
parent
5f63d31b00
commit
21cbf3484e
|
@ -46,7 +46,7 @@ class override_method(object):
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
self.view.request = clone_request(self.request, self.method)
|
self.view.request = clone_request(self.request, self.method)
|
||||||
action_map = getattr(self, 'action_map', {})
|
action_map = getattr(self.view, 'action_map', {})
|
||||||
self.view.action = action_map.get(self.method.lower())
|
self.view.action = action_map.get(self.method.lower())
|
||||||
return self.view.request
|
return self.view.request
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user