Skip to content

[pull] main from django:main#274

Merged
pull[bot] merged 2 commits intothreatcode:mainfrom
django:main
Jan 30, 2026
Merged

[pull] main from django:main#274
pull[bot] merged 2 commits intothreatcode:mainfrom
django:main

Conversation

@pull
Copy link

@pull pull bot commented Jan 30, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Instead of casting non-text fields to CharField (which prevents index
usage), skip exact lookups when the search term fails
formfield.to_python().

This preserves index usage for valid searches while gracefully handling
invalid search terms by simply not including them in the query for that
field.

For multi-term searches like 'foo 123' on search_fields=['name', 'age__exact']:
- 'foo': invalid for age, so only name lookup is used
- '123': valid for both, so both lookups are used

This entails a slight increase in permissiveness for search terms that
can be normalized by formfield.to_python().
@pull pull bot locked and limited conversation to collaborators Jan 30, 2026
@pull pull bot added the ⤵️ pull label Jan 30, 2026
@pull pull bot merged commit 4cecf30 into threatcode:main Jan 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant