From 82eeab4b74bbdf9d461a4a586eb3e34b78debb15 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 30 May 2017 14:37:56 +0200 Subject: Improved UI for bookmarks. It is now possible to search bookmarks through titles and descriptions. --- src/web/controllers/abstract.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/web/controllers') diff --git a/src/web/controllers/abstract.py b/src/web/controllers/abstract.py index ae39dff7..47cc365f 100644 --- a/src/web/controllers/abstract.py +++ b/src/web/controllers/abstract.py @@ -51,12 +51,7 @@ class AbstractController: elif key.endswith('__in'): db_filters.add(getattr(self._db_cls, key[:-4]).in_(value)) elif key.endswith('__contains'): - db_filters.add(or_( - getattr(self._db_cls, key[:-10]) \ - .contains(value.lower()), - getattr(self._db_cls, key[:-10]) \ - .contains(value.upper()) - )) + db_filters.add(getattr(self._db_cls, key[:-10]).contains(value)) elif key.endswith('__like'): db_filters.add(getattr(self._db_cls, key[:-6]).like(value)) elif key.endswith('__ilike'): -- cgit