mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
Fixed #16609 -- Fixed duplicate admin results when searching nested M2M relations.
This was fixed earlier but only when the M2M relation was at the first level on the object. This commit fixes the issue even when the M2M is at deeper levels, such as behind a foreign key.
This commit is contained in:
committed by
Tim Graham
parent
4dcc649341
commit
d084176cc1
@@ -60,6 +60,11 @@ class GroupAdmin(admin.ModelAdmin):
|
||||
list_filter = ['members']
|
||||
|
||||
|
||||
class ConcertAdmin(admin.ModelAdmin):
|
||||
list_filter = ['group__members']
|
||||
search_fields = ['group__members__name']
|
||||
|
||||
|
||||
class QuartetAdmin(admin.ModelAdmin):
|
||||
list_filter = ['members']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user