[minor] make route only if published
This commit is contained in:
parent
3ef7d5ba78
commit
21edc27a2c
1 changed files with 2 additions and 1 deletions
|
|
@ -30,7 +30,8 @@ class WebsiteGenerator(Document):
|
|||
if self.is_website_published() and not self.route:
|
||||
self.route = self.make_route()
|
||||
|
||||
self.route = self.route.strip('/.')
|
||||
if self.route:
|
||||
self.route = self.route.strip('/.')
|
||||
|
||||
def make_route(self):
|
||||
return self.scrub(self.get(self.website.page_title_field or "name"))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue