Skip to content
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

Remove uneeded drf_reverse overwrite #15078

Conversation

chrismeyersfsu
Copy link
Member

SUMMARY
ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • API
AWX VERSION
devel
ADDITIONAL INFORMATION

* `drf_reverse()` was introduced here ansible@1a75b18
* There is a comment about monkey patching. I can't find the monkey patch it is referencing.
* AWX `drf_reverse()` is a copy paste of this https://github.com/encode/django-rest-framework/blob/master/rest_framework/reverse.py#L32
  * The only difference is DRF's version calls `preserve_builtin_query_params()`
    * `preserve_builtin_query_params()` only does something if `api_settings.URL_FORMAT_OVERRIDE` is defined.
      * We don't use `REST_FRAMEWORK.URL_FORMAT_OVERRIDE`
@AlanCoding
Copy link
Member

Do named URLs still work with this change? That's what this was probably added to support.

@AlanCoding
Copy link
Member

Tested with https://localhost:8043/api/v2/job_templates/Demo%20Job%20Template++Default/ and still seems to work alright.

@chrismeyersfsu chrismeyersfsu enabled auto-merge (rebase) April 8, 2024 20:04
@chrismeyersfsu chrismeyersfsu merged commit 468949b into ansible:devel Apr 8, 2024
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants