feat(api): supports bool and reference

This commit is contained in:
pycook
2024-08-20 13:49:51 +08:00
parent 785b4d4a7d
commit e893ea1b19
15 changed files with 242 additions and 107 deletions

View File

@@ -451,6 +451,9 @@ class Search(object):
if field_type == ValueTypeEnum.DATE and len(v) == 10:
v = "{} 00:00:00".format(v)
if field_type == ValueTypeEnum.BOOL and "*" not in str(v):
v = str(int(v in current_app.config.get('BOOL_TRUE')))
# in query
if v.startswith("(") and v.endswith(")"):
_query_sql = self._in_query_handler(attr, v, is_not)