Update filters.py

This commit is contained in:
shamoon 2024-09-28 18:02:23 -07:00
parent 6ee2d1ac7d
commit bcd08a7eda

View File

@ -417,11 +417,9 @@ class CustomFieldQueryParser:
value_field_name = CustomFieldInstance.get_value_field_name(
custom_field.data_type,
)
if custom_field.data_type == CustomField.FieldDataType.MONETARY and op in (
"gt",
"gte",
"lt",
"lte",
if (
custom_field.data_type == CustomField.FieldDataType.MONETARY
and op in self.EXPR_BY_CATEGORY["arithmetic"]
):
value_field_name = "value_monetary_amount"
has_field = Q(custom_fields__field=custom_field)