[minor] make route only if published

This commit is contained in:
Rushabh Mehta 2016-06-25 18:08:27 +05:30
parent 3ef7d5ba78
commit 21edc27a2c

View file

@ -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"))