Opened 8 days ago

Closed 27 hours ago

Last modified 27 hours ago

#28898 closed Bug (fixed)

Admin check prohibits using a OneToOneField in autocomplete_fields

Reported by: Lachlan Cannon Owned by: Rodrigo Pinheiro Marques de Araújo
Component: contrib.admin Version: 2.0
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I'm currently trying to port our projects to Django 2.0, and running into a problem dropping our old, outdated autocompletes for the new built in ones, as it appears not to support OneToOne fields.

Looks like the offending line of code is here: https://github.com/django/django/blob/master/django/contrib/admin/checks.py#L107

Attachments (1)

admin-autocomplete-onetoone.patch (3.2 KB) - added by Rodrigo Pinheiro Marques de Araújo 6 days ago.
Patch - first version

Download all attachments as: .zip

Change History (8)

comment:1 Changed 7 days ago by Tim Graham

Severity: NormalRelease blocker
Summary: autocomplete_fields doesn't support OneToOneFieldAdmin check prohibits using a OneToOneField in autocomplete_fields
Triage Stage: UnreviewedAccepted

comment:2 Changed 6 days ago by Rodrigo Pinheiro Marques de Araújo

Owner: changed from nobody to Rodrigo Pinheiro Marques de Araújo
Status: newassigned

Changed 6 days ago by Rodrigo Pinheiro Marques de Araújo

Patch - first version

comment:3 Changed 6 days ago by Rodrigo Pinheiro Marques de Araújo

comment:4 Changed 5 days ago by Raphael Michel

For everyone else waiting for this: SILENCED_SYSTEM_CHECKS = ['admin.E038'] is a good-enough workaround for now :)

Last edited 27 hours ago by Tim Graham (previous) (diff)

comment:5 Changed 41 hours ago by Rodrigo Pinheiro Marques de Araújo

Has patch: set

comment:6 Changed 27 hours ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 30a389bd:

Fixed #28898 -- Corrected admin check to allow a OneToOneField in ModelAdmin.autocomplete_fields.

comment:7 Changed 27 hours ago by Tim Graham <timograham@…>

In 9f39f202:

[2.0.x] Fixed #28898 -- Corrected admin check to allow a OneToOneField in ModelAdmin.autocomplete_fields.

Backport of 30a389bd7795016d7f48bcda997e5dea5116f9bb from master

Note: See TracTickets for help on using tickets.
Back to Top