Opened 7 years ago

Closed 7 years ago

Last modified 7 years 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 7 years ago.
Patch - first version

Download all attachments as: .zip

Change History (8)

comment:1 by Tim Graham, 7 years ago

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

comment:2 by Rodrigo Pinheiro Marques de Araújo, 7 years ago

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

by Rodrigo Pinheiro Marques de Araújo, 7 years ago

Patch - first version

comment:3 by Rodrigo Pinheiro Marques de Araújo, 7 years ago

comment:4 by Raphael Michel, 7 years ago

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

Version 0, edited 7 years ago by Raphael Michel (next)

comment:5 by Rodrigo Pinheiro Marques de Araújo, 7 years ago

Has patch: set

comment:6 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In 30a389bd:

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

comment:7 by Tim Graham <timograham@…>, 7 years ago

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