Skip to content

Commit

Permalink
Fix integer field query
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankHennige committed Jun 20, 2023
1 parent 57bad5c commit 5b0ce01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/oscar_pg_search/filter_options/attribute_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ class TextAttributeField(AttributeFieldBase):
def get_query(self):
if str(self.attribute.id) in self.request_data:
values_list = self.request_data.getlist(str(self.attribute.id))
if self.attribute.type in (self.attribute.TEXT, self.attribute.FLOAT):
text_fields = (self.attribute.TEXT, self.attribute.FLOAT,
self.attribute.INTEGER)
if self.attribute.type in text_fields:
values = self.attribute.productattributevalue_set.filter(
id__in=values_list)
values = values.values_list(self.fieldname, flat=True)
Expand Down

0 comments on commit 5b0ce01

Please sign in to comment.