Force search query to lowercase
authorThierry Florac <thierry.florac@onf.fr>
Tue, 27 Nov 2018 14:57:36 +0100
changeset 1123 6f299ad6e72f
parent 1122 5417a16e6ce6
child 1124 de6e9b0637b6
Force search query to lowercase
src/pyams_content/root/zmi/search.py
src/pyams_content/shared/common/zmi/search.py
--- a/src/pyams_content/root/zmi/search.py	Tue Nov 27 08:50:37 2018 +0100
+++ b/src/pyams_content/root/zmi/search.py	Tue Nov 27 14:57:36 2018 +0100
@@ -115,6 +115,7 @@
         query = self.request.params.get('query')
         if query:
             sequence = get_utility(ISequentialIntIds)
+            query = query.lower()
             if query.startswith('+'):
                 params &= Eq(catalog['oid'], sequence.get_full_oid(query))
             else:
--- a/src/pyams_content/shared/common/zmi/search.py	Tue Nov 27 08:50:37 2018 +0100
+++ b/src/pyams_content/shared/common/zmi/search.py	Tue Nov 27 14:57:36 2018 +0100
@@ -117,6 +117,7 @@
         query = self.request.params.get('query')
         if query:
             sequence = get_utility(ISequentialIntIds)
+            query = query.lower()
             if query.startswith('+'):
                 params &= Eq(catalog['oid'], sequence.get_full_oid(query))
             else: