7

Fix not updating visitor count rule properly

This commit is contained in:
Tomasz Knapik
2017-11-23 14:10:16 +00:00
parent fdc2b97194
commit 0a42ce3eeb

View File

@ -133,12 +133,13 @@ class SessionSegmentsAdapter(BaseSegmentsAdapter):
if page_visits:
for page_visit in page_visits:
page_visit['count'] += 1
page_visit['path'] = page.url_path if page else self.request.path
self.request.session.modified = True
else:
visit_count.append({
'slug': page.slug,
'id': page.pk,
'path': self.request.path,
'path': page.url_path if page else self.request.path,
'count': 1,
})