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

Make named url work with optional url prefix #15114

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

chrismeyersfsu
Copy link
Member

SUMMARY
  • Make named url work with optional url prefix
ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • API
AWX VERSION
devel
ADDITIONAL INFORMATION

@AlanCoding
Copy link
Member

This is really hard to parse. My reading is that the job of this method is to extract the named component of the URL, and then call the method that gets the pk from that, and glue it back together and return that. I would like the high-level conditional to be more clear. Like, after stripping the leading/trailing slashes, .startswith("api/v2") seems like it would be a really durable and understandable heuristic. The stuff with counting the number of slashes starts looking like insanity.

@chrismeyersfsu chrismeyersfsu force-pushed the AAP-22853-fix-named-url branch 2 times, most recently from adb83d1 to ed68eac Compare May 8, 2024 12:18
* Handle named url sub-resources
* i.e. /api/v2/inventories/my_inventory++Default/hosts/
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.

None yet

2 participants