def lookups(self, request, model_admin): return CustomerState.choices()
def queryset(self, request, queryset): try: queryset = queryset.filter(customer__recognized=CustomerState(int(self.value()))) finally: return queryset