From 7d7e4a5242ba029dbf81153433069edfe37d5a03 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 30 May 2017 11:31:12 +0200 Subject: hack --- src/web/controllers/abstract.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/web') diff --git a/src/web/controllers/abstract.py b/src/web/controllers/abstract.py index 47cc365f..ae39dff7 100644 --- a/src/web/controllers/abstract.py +++ b/src/web/controllers/abstract.py @@ -51,7 +51,12 @@ class AbstractController: elif key.endswith('__in'): db_filters.add(getattr(self._db_cls, key[:-4]).in_(value)) elif key.endswith('__contains'): - db_filters.add(getattr(self._db_cls, key[:-10]).contains(value)) + db_filters.add(or_( + getattr(self._db_cls, key[:-10]) \ + .contains(value.lower()), + getattr(self._db_cls, key[:-10]) \ + .contains(value.upper()) + )) elif key.endswith('__like'): db_filters.add(getattr(self._db_cls, key[:-6]).like(value)) elif key.endswith('__ilike'): -- cgit