      title = 'publication decade'
      parameter_name = 'decade__isnull' # Ends with '__isnull"
  
  
  class CustomUserAdmin(UserAdmin):
      list_filter = ('books_authored', 'books_contributed')
  
  class BookAdmin(ModelAdmin):
 
</s> remove         dev = Department.objects.create(code='DEV', description='Development')
        design = Department.objects.create(code='DSN', description='Design')
        john = Employee.objects.create(name='John Blue', department=dev)
        jack = Employee.objects.create(name='Jack Red', department=design)

 </s> add  </s> remove         self.assertEqual(list(queryset), [john])
 </s> add         self.assertEqual(list(queryset), [self.john]) </s> remove         self.assertEqual(list(queryset), [jack, john])
 </s> add         self.assertEqual(list(queryset), [self.jack, self.john])
class DepartmentListFilterLookupWithNonStringValue(SimpleListFilter):
    title = 'department'
    parameter_name = 'department'

    def lookups(self, request, model_admin):
        return set([
            (employee.department.id,  # Intentionally not a string (Refs #19318)
             employee.department.code)
            for employee in model_admin.queryset(request).all()
        ])

    def queryset(self, request, queryset):
        if self.value():
            return queryset.filter(department__id=self.value())

      title = 'publication decade'
      parameter_name = 'decade__isnull' # Ends with '__isnull"
  
  
class DepartmentListFilterLookupWithNonStringValue(SimpleListFilter):
    title = 'department'
    parameter_name = 'department'

    def lookups(self, request, model_admin):
        return set([
            (employee.department.id,  # Intentionally not a string (Refs #19318)
             employee.department.code)
            for employee in model_admin.queryset(request).all()
        ])

    def queryset(self, request, queryset):
        if self.value():
            return queryset.filter(department__id=self.value())

  class CustomUserAdmin(UserAdmin):
      list_filter = ('books_authored', 'books_contributed')
  
  class BookAdmin(ModelAdmin):
keep keep keep add keep keep keep keep
 Fixed #19318 -- Ensured that the admin's SimpleListFilter options can be displayed as selected even if the lookup's first element is not a string. 
tests/regressiontests/admin_filters/tests.py