fix: 🐛 db search

Escape ":" character in SQLAlchemy
This commit is contained in:
lovvvve 2021-11-10 18:56:42 +08:00 committed by GitHub
parent 9c76b388c9
commit 98c7f97274
1 changed files with 1 additions and 1 deletions

View File

@ -242,7 +242,7 @@ class Search(object):
_query_sql = "" _query_sql = ""
if ":" in q: if ":" in q:
k = q.split(":")[0].strip() k = q.split(":")[0].strip()
v = ":".join(q.split(":")[1:]).strip() v = "\:".join(q.split(":")[1:]).strip()
current_app.logger.debug(v) current_app.logger.debug(v)
field, field_type, operator, attr = self._attr_name_proc(k) field, field_type, operator, attr = self._attr_name_proc(k)
if field == "_type": if field == "_type":