# HG changeset patch # User Goffi # Date 1529536787 -7200 # Node ID 045e8bdaed4fbeda577c37d94b1fbc966565241c # Parent 3a7b2b239d3eef0d8e06529dd7c611950aa23662 pages: ignore args if they are None in getSubPageURL diff -r 3a7b2b239d3e -r 045e8bdaed4f src/server/pages.py --- a/src/server/pages.py Thu Jun 21 01:19:42 2018 +0200 +++ b/src/server/pages.py Thu Jun 21 01:19:47 2018 +0200 @@ -491,11 +491,12 @@ @param page_name(unicode): name of the page to retrieve it must be a direct children of current page @param *args(list[unicode]): arguments to add as path elements + if an arg is None, it will be ignored @return (unicode): absolute URL to the sub page """ current_url = self.getCurrentURL(request) path, child = self.getSubPageByName(page_name) - return os.path.join(u'/', current_url, path, *[quote(a) for a in args]) + return os.path.join(u'/', current_url, path, *[quote(a) for a in args if a is not None]) def getURLByNames(self, named_path): """retrieve URL from pages names and arguments