diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2017-05-30 11:31:12 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2017-05-30 11:31:12 +0200 |
commit | 7d7e4a5242ba029dbf81153433069edfe37d5a03 (patch) | |
tree | 5c3ea6d3fae51919c517cafef2d0034a873206f7 /src/web/controllers/abstract.py | |
parent | A tag can be uppercase (diff) | |
download | newspipe-7d7e4a5242ba029dbf81153433069edfe37d5a03.tar.gz newspipe-7d7e4a5242ba029dbf81153433069edfe37d5a03.tar.bz2 newspipe-7d7e4a5242ba029dbf81153433069edfe37d5a03.zip |
hack
Diffstat (limited to 'src/web/controllers/abstract.py')
-rw-r--r-- | src/web/controllers/abstract.py | 7 |
1 files changed, 6 insertions, 1 deletions
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'): |