Compute percentile over orders of the same type (#201)

This commit is contained in:
merchero 2022-07-31 21:43:46 +02:00 committed by GitHub
parent 3ae6087a87
commit 56bc602d34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,7 +147,7 @@ premium_percentile = {}
def compute_premium_percentile(order):
queryset = Order.objects.filter(
currency=order.currency, status=Order.Status.PUB).exclude(id=order.id)
currency=order.currency, status=Order.Status.PUB, type=order.type).exclude(id=order.id)
print(len(queryset))
if len(queryset) <= 1: