# HG changeset patch # User Thierry Florac # Date 1611758781 -3600 # Node ID 0f646872d21bad11e8230b59b0492dfc38aa3033 # Parent 53f02f01df6501f0364b4ce5fff98ade930f2f7f Added test on themes manager diff -r 53f02f01df65 -r 0f646872d21b src/pyams_content/component/theme/zmi/__init__.py --- a/src/pyams_content/component/theme/zmi/__init__.py Wed Jan 13 14:10:56 2021 +0100 +++ b/src/pyams_content/component/theme/zmi/__init__.py Wed Jan 27 15:46:21 2021 +0100 @@ -141,9 +141,10 @@ if 'themes' in self.widgets: widget = self.widgets['themes'] target = get_parent(self.context, IThemesManagerTarget) - manager = IThemesManager(target) - widget.thesaurus_name = manager.thesaurus_name - widget.extract_name = manager.extract_name + if target is not None: + manager = IThemesManager(target) + widget.thesaurus_name = manager.thesaurus_name + widget.extract_name = manager.extract_name @adapter_config(context=(IThemesTarget, IAdminLayer, BaseThemesEditForm), provides=IPageHeader)