Opened 9 months ago

Closed 8 months ago

Last modified 8 months 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 Changed 8 months ago by Federico Jaramillo Martínez

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

comment:2 Changed 8 months ago by Federico Jaramillo Martínez

Has patch: set

comment:3 Changed 8 months ago by Mariusz Felisiak <felisiak.mariusz@…>

Resolution: fixed
Status: assignedclosed

In 179d9dc0:

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

Thanks dacotagh for the report.

comment:4 Changed 8 months ago by Mariusz Felisiak <felisiak.mariusz@…>

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