#35020: DisallowedModelAdminLookup for foreign key to non-AutoField primary key
-------------------------------------+-------------------------------------
Reporter: Joshua Goodwin | Owner: Sarah
| Boyce
Type: Bug | Status: closed
Component: contrib.admin | Version: 5.0
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by aleksanb):
Hi.
This seems to have broken django admin url filtering on foreign keys as
well.
I have a model, PriceGroup with FK to Booking, and when i attempt to
filter PriceGroup in django admin on ?booking_id=... in the url i get
`Error: Filtering by booking not allowed` in a small red alert box.
The foreign key being declared as
booking = models.ForeignKey(Booking, null=False,
on_delete=models.PROTECT)
and booking having the default primary key that django makes.
--
Ticket URL: <https://code.djangoproject.com/ticket/35020#comment:9>
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/0107018cd9e54132-672942ee-1c15-4520-9f9e-1723209bae35-000000%40eu-central-1.amazonses.com.