From 87e2dfe3c5fad86896dd35476b45ecf9d28085b9 Mon Sep 17 00:00:00 2001 From: Frank Hennige Date: Tue, 20 Jun 2023 16:41:16 +0200 Subject: [PATCH] Fix getting value of all attributes --- src/oscar_pg_search/filter_options/attribute_fields.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/oscar_pg_search/filter_options/attribute_fields.py b/src/oscar_pg_search/filter_options/attribute_fields.py index 43e3c67..739314e 100644 --- a/src/oscar_pg_search/filter_options/attribute_fields.py +++ b/src/oscar_pg_search/filter_options/attribute_fields.py @@ -21,6 +21,7 @@ def get_query(self): id__in=values_list) values = values.values_list(self.fieldname, flat=True) query_kwargs = { + 'attribute_values__attribute__code': self.attribute.code, f'attribute_values__{self.fieldname}__in': values, } return Q(**query_kwargs)