Skip to content

Fix GroupRoleSerializer domain field view_name typo#7347

Open
gerrod3 wants to merge 2 commits intopulp:mainfrom
gerrod3:7095-4
Open

Fix GroupRoleSerializer domain field view_name typo#7347
gerrod3 wants to merge 2 commits intopulp:mainfrom
gerrod3:7095-4

Conversation

@gerrod3
Copy link
Contributor

@gerrod3 gerrod3 commented Feb 24, 2026

Summary

  • Fixed typo in GroupRoleSerializer.domain field: view_name="domain-detail"view_name="domains-detail", matching the correct URL pattern name used in UserRoleSerializer.
  • This caused a NoReverseMatch error (HTTP 500) whenever a group role with a non-null domain was serialized, and also when rendering the browsable API form (which enumerates domain choices).

Test plan

  • Added functional test test_group_roles_with_domain that creates a group role with the default domain and verifies it can be listed and the domain href is correct.

Fixes #7095

Made with Cursor

gerrod3 and others added 2 commits February 23, 2026 20:47
closes pulp#7095

Assisted-by: Claude (claude-4.6-opus)
Co-authored-by: Cursor <cursoragent@cursor.com>
@gerrod3
Copy link
Contributor Author

gerrod3 commented Feb 24, 2026

This PR is a test of the new claude.md changes here: #7345. Prompts used:

Solve this issue: https://github.com/pulp/pulpcore/pull/7345
...
test the fix
...
change the test to a functional one
...
why did the issue originally happen for browser requests, but not curl?
...
so the error should always happen for any group-role with domain? let's update the test to reflect this
...
ok lets make a pr

The first prompt solved the problem. The second one wrote a unit test and checked that it passed. The next three were me reviewing the fix and why it worked and getting it to use a functional test. The last one created the changelog entry and commit, then push and created the PR.

Seems we need a lint step in the PR checklist, although that should soon be replaced with the pre-commit lint hook.

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.

Endpoint /pulp/api/v3/groups/<group_id>/roles/ gets HTTP 500 when accessed from browser

1 participant