Merge pull request #1 from mijaba/mijaba-patch-1

Update table.py to fix startswith/endswith
This commit is contained in:
mijaba 2021-08-11 14:29:15 +02:00 committed by GitHub
commit 79a47a4f6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -413,9 +413,9 @@ class Table(object):
start, end = value
return self.table.c[column].between(start, end)
if op in ("startswith",):
return self.table.c[column].like("%" + value)
if op in ("endswith",):
return self.table.c[column].like(value + "%")
if op in ("endswith",):
return self.table.c[column].like("%" + value)
return false()
def _args_to_clause(self, args, clauses=()):