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
+2 -2
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=()):