Skip to content

Fix oauth2 list client search crashing#532

Merged
jdelic merged 1 commit into
developfrom
fix/oauth2-list-search
Jul 24, 2026
Merged

Fix oauth2 list client search crashing#532
jdelic merged 1 commit into
developfrom
fix/oauth2-list-search

Conversation

@jdelic

@jdelic jdelic commented Jul 24, 2026

Copy link
Copy Markdown
Owner

'oauth2 list --search-client-name' crashed with an AttributeError (objects.file instead of objects.filter) and both search branches used the invalid '__ilike' lookup, which raises FieldError for --search-client-id. Use filter() with '__icontains' (the Django equivalent of SQL ILIKE substring matching) and report a not-found search on stderr instead of relying on the dead DoesNotExist handler (filter() never raises it).

Adds regression tests for oauth2 list and both search options.

Claude-Session: https://claude.ai/code/session_01AgWqnQ8ExYjdZofXbvJZEz

'oauth2 list --search-client-name' crashed with an AttributeError
(objects.file instead of objects.filter) and both search branches used
the invalid '__ilike' lookup, which raises FieldError for
--search-client-id. Use filter() with '__icontains' (the Django
equivalent of SQL ILIKE substring matching) and report a not-found
search on stderr instead of relying on the dead DoesNotExist handler
(filter() never raises it).

Adds regression tests for oauth2 list and both search options.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgWqnQ8ExYjdZofXbvJZEz
@jdelic
jdelic merged commit b53f009 into develop Jul 24, 2026
5 checks passed
@jdelic
jdelic deleted the fix/oauth2-list-search branch July 24, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant