Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#31952 closed Bug (fixed)

Using EmptyFieldListFilter with reverse relationship crashes

Reported by: Mariusz Felisiak Owned by: Federico Jaramillo Martínez
Component: contrib.admin Version: 3.1
Severity: Release blocker Keywords:
Cc: Federico Jaramillo Martínez, Jonas Haag, Christophe Baldy, dacotagh Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Using EmptyFieldListFilter with reverse relationship crashes because they don't have empty_strings_allowed attribute. I reproduced this issue with all types of reverse relationship:

AttributeError: 'ManyToManyRel' object has no attribute 'empty_strings_allowed'
AttributeError: 'ManyToOneRel' object has no attribute 'empty_strings_allowed'
AttributeError: 'OneToOneRel' object has no attribute 'empty_strings_allowed'

Thanks dacotagh for the report.

Change History (4)

comment:1 by Federico Jaramillo Martínez, 4 years ago

Owner: changed from nobody to Federico Jaramillo Martínez
Status: newassigned

comment:2 by Federico Jaramillo Martínez, 4 years ago

Has patch: set

comment:3 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 179d9dc0:

Fixed #31952 -- Fixed EmptyFieldListFilter crash with reverse relationships.

Thanks dacotagh for the report.

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In c4e5384e:

[3.1.x] Fixed #31952 -- Fixed EmptyFieldListFilter crash with reverse relationships.

Thanks dacotagh for the report.

Backport of 179d9dc0c2265176f9f7062a1d98dc44d896f91f from master

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