mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-06-26 08:23:30 +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__
|
field_name_types[name] = field.__class__.__name__
|
||||||
|
|
||||||
actions[method] = field_name_types
|
actions[method] = field_name_types
|
||||||
except:
|
except exceptions.PermissionDenied:
|
||||||
|
# don't add this method
|
||||||
|
pass
|
||||||
|
except exceptions.NotAuthenticated:
|
||||||
# don't add this method
|
# don't add this method
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user