﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32038	Using EmptyFieldListFilter with GenericForeignKey and GenericRelation crashes.	Javier Matos Odut	Mariusz Felisiak	"I have a GenericForeignKey in my model:

{{{
content_type_resource_contract = models.ForeignKey(
    ContentType,
    on_delete=models.CASCADE,
    blank=True,
    null=True,
)
resource_contract_id = models.PositiveIntegerField(blank=True, null=True)
resource_contract = GenericForeignKey('content_type_resource', 'resource_contract_id')
}}}

and I want to use the new admin.EmptyFieldListFilter in my model admin:

{{{
class myAdmin(admin.ModelAdmin):
    list_filter = (('resource_contract', admin.EmptyFieldListFilter),)
}}}

But when I try to run it I get a ""'GenericForeignKey' object has no attribute 'empty_strings_allowed'"". It will work fine if I use the resource_contract_id field. Would it make sense to extend the GenericForeignKey to use those empty_strings_allowed attributes from fields that are used in this generic relation?
"	Bug	closed	contrib.admin	3.1	Release blocker	fixed	admin contenttypes	Federico Jaramillo Martínez	Accepted	1	0	0	0	0	0
