              'display': _('All'),
          }
          for lookup, title in self.lookup_choices:
              yield {
                  'selected': self.value() == lookup,
                  'query_string': cl.get_query_string({
                      self.parameter_name: lookup,
                  }, []),
                  'display': title,
              }
 
</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]) </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 
                'selected': self.value() == force_text(lookup),
              'display': _('All'),
          }
          for lookup, title in self.lookup_choices:
              yield {
                'selected': self.value() == force_text(lookup),
                  'query_string': cl.get_query_string({
                      self.parameter_name: lookup,
                  }, []),
                  'display': title,
              }
keep keep keep keep replace keep 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. 
django/contrib/admin/filters.py