fix: tag_ids overlap 参数显式标注 UUID 类型,修复 uuid[] && text[] 搜索 500
This commit is contained in:
@@ -507,8 +507,8 @@ class AdvancedSearchEngine:
|
||||
children = (await db.execute(select(GlobalTag.id).where(or_(*child_conds)))).scalars().all()
|
||||
all_tag_ids.update(children)
|
||||
uids = list(all_tag_ids)
|
||||
from sqlalchemy.dialects.postgresql import array as _pg_array
|
||||
conditions.append(GlobalLiterature.tag_ids.overlap(_pg_array(uids)))
|
||||
from sqlalchemy.dialects.postgresql import array as _pg_array, UUID as _pg_uuid
|
||||
conditions.append(GlobalLiterature.tag_ids.overlap(_pg_array(uids, type_=_pg_uuid())))
|
||||
|
||||
# 发表类型(PG JSONB contains)
|
||||
if pub_types:
|
||||
|
||||
Reference in New Issue
Block a user