mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-14 18:23:14 +00:00
Don't call Site.get_root_paths() twice in Page.url property
This commit is contained in:
parent
337a979257
commit
51bf76ba70
1 changed files with 1 additions and 1 deletions
|
|
@ -589,7 +589,7 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed
|
|||
Return None if the page is not routable.
|
||||
"""
|
||||
root_paths = Site.get_site_root_paths()
|
||||
for (id, root_path, root_url) in Site.get_site_root_paths():
|
||||
for (id, root_path, root_url) in root_paths:
|
||||
if self.url_path.startswith(root_path):
|
||||
return ('' if len(root_paths) == 1 else root_url) + reverse('wagtail_serve', args=(self.url_path[len(root_path):],))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue