Make the static segments work with match_any and fix bug in visit count
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user