Browsable API returns standard Django 404 page for existing object #8596
Unanswered
astro-stan
asked this question in
Question & Answer
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Checklist
[ X] Raised initially as discussion #... In this case I am confident it is a bug (see below)
[ V] This cannot be dealt with as a third party library. (We prefer new functionality to be in the form of third party libraries where possible.)
[ V] I have reduced the issue to the simplest possible case.
Using:
Create the following classes:
Finally create the permissions class as well:
The user I am testing with has:
Tests:
api/user/3
orapi/user/3?format=json
:api/user/2
(user with PK=2 exists!):api/user/2?format=json
:Curiously enough, if I do not override the
has_object_permission
method - everything works as expected even though it still raises the same exception (Http404) as the logged in user does not have obejct permissions for user with pk == 2.Beta Was this translation helpful? Give feedback.
All reactions