# HG changeset patch # User Thierry Florac # Date 1495406629 -7200 # Node ID d3f76ee1af666a32b6b1fef8af28251235352b65 # Parent 827feec71488870679e951ec17ce49adb9917d2d Add check against empty thesaurus name diff -r 827feec71488 -r d3f76ee1af66 src/pyams_thesaurus/thesaurus.py --- a/src/pyams_thesaurus/thesaurus.py Tue May 16 11:25:21 2017 +0200 +++ b/src/pyams_thesaurus/thesaurus.py Mon May 22 00:43:49 2017 +0200 @@ -374,7 +374,7 @@ thesaurus = get_parent(context, IThesaurus) if thesaurus is None: context_manager = IThesaurusContextManager(context, None) - if context_manager is not None: + if (context_manager is not None) and context_manager.thesaurus_name: thesaurus = query_utility(IThesaurus, name=context_manager.thesaurus_name) if thesaurus is not None: extracts = IThesaurusExtracts(thesaurus)