From f79fe1838eab7ad9fc091991cf89cdb6c379e2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 22 Aug 2013 10:22:24 +0200 Subject: [PATCH] do not duplicate matching terms in end list (#2975) --- src/collective/dms/thesaurus/browser/thesaurusview.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/collective/dms/thesaurus/browser/thesaurusview.py b/src/collective/dms/thesaurus/browser/thesaurusview.py index 28686ec..269d1ca 100644 --- a/src/collective/dms/thesaurus/browser/thesaurusview.py +++ b/src/collective/dms/thesaurus/browser/thesaurusview.py @@ -139,8 +139,9 @@ class ListKeywordsView(BrowserView): for word in title.split(): if word.lower().startswith(q): intermediate.append((normalized, item)) - continue - other.append((normalized, item)) + break + else: + other.append((normalized, item)) startswith.sort() intermediate.sort()