mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-09-16 09:12:29 +03:00
Merge 81a306d5fc
into 00d3aa21ba
This commit is contained in:
commit
120402306c
|
@ -220,8 +220,9 @@ class View(ResourceMixin, RequestMixin, ResponseMixin, AuthMixin, DjangoView):
|
|||
self._check_permissions()
|
||||
|
||||
# Get the appropriate handler method
|
||||
if self.method.lower() in self.http_method_names:
|
||||
handler = getattr(self, self.method.lower(), self.http_method_not_allowed)
|
||||
method_name = self.method.lower()
|
||||
if method_name in self.http_method_names:
|
||||
handler = getattr(self, method_name, self.http_method_not_allowed)
|
||||
else:
|
||||
handler = self.http_method_not_allowed
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user