mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 08:14:16 +03:00
only catch relevant exceptions ;)
This commit is contained in:
parent
f8c1481d4b
commit
b4dbfa9832
|
@ -83,7 +83,10 @@ class APIView(View):
|
|||
field_name_types[name] = field.__class__.__name__
|
||||
|
||||
actions[method] = field_name_types
|
||||
except:
|
||||
except exceptions.PermissionDenied:
|
||||
# don't add this method
|
||||
pass
|
||||
except exceptions.NotAuthenticated:
|
||||
# don't add this method
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user