From 46176b19fc91d1d3e455a94e026381f1c6f5ebc0 Mon Sep 17 00:00:00 2001 From: CasperVerswijvelt Date: Sat, 24 Apr 2021 13:04:21 +0200 Subject: [PATCH] Merge 2 steps --- shynet/core/models.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/shynet/core/models.py b/shynet/core/models.py index 7c8122c..9fe575d 100644 --- a/shynet/core/models.py +++ b/shynet/core/models.py @@ -132,10 +132,8 @@ class Service(models.Model): service=self, start_time__lt=end_time, start_time__gt=start_time ) hit_count = hits.count() - hits = Hit.objects.filter( - service=self - ) - has_hits = hits.exists() + + has_hits = Hit.objects.filter(service=self).exists() bounces = sessions.filter(is_bounce=True) bounce_count = bounces.count()