From a9c901ba022ce9de9e3f0b8c9085bf59656d495f Mon Sep 17 00:00:00 2001 From: Gleb Lysov <17965301+hardenchant@users.noreply.github.com> Date: Fri, 12 Mar 2021 16:32:14 +0300 Subject: [PATCH] fix error psycopg2.ProgrammingError: can't adapt type 'CombinedExpression' --- bitfield/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitfield/admin.py b/bitfield/admin.py index 30f0cf0e..d1766d2e 100644 --- a/bitfield/admin.py +++ b/bitfield/admin.py @@ -23,7 +23,7 @@ def __init__(self, field, request, params, model, model_admin, field_path): def queryset(self, request, queryset): filter_kwargs = dict( - (p, BitHandler(v, ())) + (p, BitHandler(v, getattr(queryset.model, p))) for p, v in six.iteritems(self.used_parameters) ) if not filter_kwargs: