From 712cabe3daf73dbc8b139d72d0a1dc0667d91f26 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 12 Mar 2021 11:17:17 +0000 Subject: [PATCH] fixed for stats_admin geo filtering --- core/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/views.py b/core/views.py index 8568d00..ac62e81 100644 --- a/core/views.py +++ b/core/views.py @@ -209,9 +209,9 @@ def admin_stats(request): products_per_region = {} for region in Region.objects.all(): - count = Company.objects.filter(geo__dwithin=region.geo).count() + count = Company.objects.filter(geo__within=region.geo).count() companies_per_region[region.name] = count - count = Product.objects.filter(company__geo__dwithin=region.geo).count() + count = Product.objects.filter(company__geo__within=region.geo).count() products_per_region[region.name] = count data = {