Mercurial > hg > MPIWGWeb
changeset 18:3913a1c5c583
feature's getPath returns None if it can't find the template.
author | casties |
---|---|
date | Fri, 05 Apr 2013 16:28:52 +0200 |
parents | 6d374d94c7e3 |
children | 2609e2b47aa2 |
files | MPIWGFeature.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/MPIWGFeature.py Fri Apr 05 16:06:19 2013 +0200 +++ b/MPIWGFeature.py Fri Apr 05 16:28:52 2013 +0200 @@ -128,8 +128,11 @@ if relative: return '%s/%s/%s'%(self.getId(), dir.getId(), page) - pt = getattr(dir, page) - return pt.absolute_url_path() + pt = getattr(dir, page, None) + if pt is not None: + return pt.absolute_url_path() + + return None def getTeaserPath(self): """returns the path to the teaser template"""