From d26e39c85f8cd01d26c8a905397e1af0d208540a Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Mon, 6 Jan 2025 22:49:11 +0100 Subject: [PATCH] refactor(Price tags): allow filter by created gte & lte. ref #656 --- open_prices/api/proofs/filters.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/open_prices/api/proofs/filters.py b/open_prices/api/proofs/filters.py index 12f4bc9b..f07cd4af 100644 --- a/open_prices/api/proofs/filters.py +++ b/open_prices/api/proofs/filters.py @@ -45,6 +45,12 @@ class PriceTagFilter(django_filters.FilterSet): status__isnull = django_filters.BooleanFilter( field_name="status", lookup_expr="isnull" ) + created__gte = django_filters.DateTimeFilter( + field_name="created", lookup_expr="gte" + ) + created__lte = django_filters.DateTimeFilter( + field_name="created", lookup_expr="lte" + ) class Meta: model = PriceTag