From 045dba9940648b86bdd052b43b6a37aee6ff4c70 Mon Sep 17 00:00:00 2001 From: Taha Jahangir Date: Sun, 27 May 2018 10:56:08 +0430 Subject: [PATCH] Revert "Fixed issue #26" Reverting this commit actually fixes https://github.com/disqus/django-bitfield/issues/26 This reverts commit 769f03269dc64a48b12cf08082d30c419a7e2496. --- bitfield/admin.py | 13 ------------- 1 file changed, 13 deletions(-) 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]