Skip to content

Fix API for numeric paths and usernames

Dan Jensen requested to merge 331896-fix-api-requests-with-numeric-path into master

What does this MR do?

Groups and Projects can have numeric names, and Users can have numeric usernames, meaning they have numeric paths. Previously the API assumed a numeric parameter was an ID, and would fail to return data for anything with a numeric path. This fixes that bug by falling back to a path lookup if an ID lookup fails.

Performance note: In the case of numeric names, an additional database request will be performed. Because numeric names are uncommon, and the additional database request is not remarkable, this is expected to have negligible performance impact.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #331896 (closed)

Edited by Dan Jensen

Merge request reports

Loading