-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: invalid response type on post request #15609
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, but: @AlanCoding might know if there's a more DRF-ey way to do this with @api_view
or the like. But this looks simple enough to me and fixes the fatal.
Actually: It might be nice to have a regression test for this (just mocking out is_proxied_request and calling the endpoint) |
@relrod I'm working on a test for this 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving current changes- I wasn't sure if the test work was happening elsewhere.
Would add tests for this one, feels self-contained enough 🙏 |
@djyasin @PabloHiro thanks, I'll add the tests in this PR |
Quality Gate passedIssues Measures |
SUMMARY
Fix the 500 response when sending an unauthenticated
POST
request to/api/controller/login
. Using a djangoJsonResponse
avoids the error.Verified by running this on OpenShift with Gateway.
ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION