Code

Ticket #17789: 17789.diff

File 17789.diff, 641 bytes (added by aaugustin, 2 years ago)
Line 
1Index: django/contrib/admin/options.py
2===================================================================
3--- django/contrib/admin/options.py     (revision 17649)
4+++ django/contrib/admin/options.py     (working copy)
5@@ -269,7 +269,7 @@
6             if len(parts) == 1:
7                 return True
8             clean_lookup = LOOKUP_SEP.join(parts)
9-            return clean_lookup in self.list_filter or clean_lookup == self.date_hierarchy
10+            return clean_lookup in [isinstance(f, (tuple, list)) and f[0] or f for f in self.list_filter] or clean_lookup == self.date_hierarchy
11 
12     def has_add_permission(self, request):
13         """