diff --git a/bitfield/admin.py b/bitfield/admin.py index 104e76e..a656874 100644 --- a/bitfield/admin.py +++ b/bitfield/admin.py @@ -1,13 +1,7 @@ -import six - -from django.db.models import F -from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from django.contrib.admin import FieldListFilter -from django.contrib.admin.options import IncorrectLookupParameters from bitfield import Bit -from bitfield.compat import bitor class BitFieldListFilter(FieldListFilter): @@ -23,13 +17,6 @@ def __init__(self, field, request, params, model, model_admin, field_path): super(BitFieldListFilter, self).__init__( field, request, params, model, model_admin, field_path) - def queryset(self, request, queryset): - filter = dict((p, bitor(F(p), v)) for p, v in six.iteritems(self.used_parameters)) - try: - return queryset.filter(**filter) - except ValidationError as e: - raise IncorrectLookupParameters(e) - def expected_parameters(self): return [self.lookup_kwarg]