#34402: Admin search_fields crashes for inherited model and __iexact lookup.
--------------------------------+-----------------------------------------
Reporter: Pavel Pančocha | Owner: Rahmat Faisal
Type: Bug | Status: assigned
Component: contrib.admin | Version: 3.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+-----------------------------------------
Comment (by Pavel Pančocha):
Replying to [comment:8 Sarah Boyce]:
> Can you not define the search_fields here to be `payer_ptr__pk__iexact`
(as you would when constructing a filter)?
> I feel like transforming the query for the `search_fields` might be
surprising as this error is consistent as to if you were to do this with
`.filter`.
>
> (If we want this transforming behaviour I have a patch ready, just not
convinced it's what we want)
Sorry, I don't get your comment. The search fields are
`("pk__iexact",...`. Or what else do you propose? The issue is, that it
differs in the way it works with "id" and how with "pk".
If I can help more, let me know please.
--
Ticket URL: <https://code.djangoproject.com/ticket/34402#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018bd36fa3c6-3b4ff425-4595-4f6d-a722-613f2bfaf5b0-000000%40eu-central-1.amazonses.com.