Handle empty title in metas header adapter
authorThierry Florac <tflorac@ulthar.net>
Wed, 13 Feb 2019 17:04:35 +0100
changeset 417 beb53f316430
parent 416 b57e8a8a86fb
child 418 ef8383d7b9a2
Handle empty title in metas header adapter
src/pyams_default_theme/shared/common/__init__.py
--- a/src/pyams_default_theme/shared/common/__init__.py	Fri Feb 01 18:39:15 2019 +0100
+++ b/src/pyams_default_theme/shared/common/__init__.py	Wed Feb 13 17:04:35 2019 +0100
@@ -35,7 +35,7 @@
     def get_metas(self):
         i18n = II18n(self.context)
         title = i18n.query_attribute('title', request=self.request)
-        yield HTMLTagMeta('title', title)
+        yield HTMLTagMeta('title', title or '----')
         description = i18n.query_attribute('description', request=self.request)
         if (not description) and self.context.handle_header:
             description = i18n.query_attribute('header', request=self.request)