-
-
Notifications
You must be signed in to change notification settings - Fork 302
Open
Description
datebased_prices = (
BasePrice.objects.instance_of(DateBasedPrice)
.filter(car=car, DateBasedPrice___range__overlap=DateRange(range.lower.date(), range.upper.date()))
.annotate(range_overlap=F('DateBasedPrice___range'))
)
datetimebased_prices = (
BasePrice.objects.instance_of(DateTimeBasedPrice)
.filter(car=car, DateTimeBasedPrice___range__overlap=range)
.annotate(range_overlap=F('DateTimeBasedPrice___range'))
)
prices = (datebased_prices | datetimebased_prices)
all times return None in range_overlap
ThukuWakogi
Metadata
Metadata
Assignees
Labels
No labels