7

Make the static segments work with match_any and fix bug in visit count

This commit is contained in:
Todd Dembrey
2017-10-24 10:50:05 +01:00
parent a116b14d57
commit 9e0fc8e6fd
4 changed files with 44 additions and 11 deletions

View File

@ -144,7 +144,7 @@ class SessionSegmentsAdapter(BaseSegmentsAdapter):
def get_visit_count(self, page=None):
"""Return the number of visits on the current request or given page"""
path = page.path if page else self.request.path
path = page.url_path if page else self.request.path
visit_count = self.request.session.setdefault('visit_count', [])
for visit in visit_count:
if visit['path'] == path: