mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
feat: switch search filters from OR to AND logic
This commit is contained in:
@@ -55,7 +55,7 @@ def build_data_training_query(session: SessionDep, oid: int, name: Optional[str]
|
||||
|
||||
if ds_filter_condition is not None and adv_filter_condition is not None:
|
||||
parent_ids_subquery = parent_ids_subquery.where(
|
||||
or_(ds_filter_condition, adv_filter_condition)
|
||||
and_(ds_filter_condition, adv_filter_condition)
|
||||
)
|
||||
elif ds_filter_condition is not None:
|
||||
parent_ids_subquery = parent_ids_subquery.where(ds_filter_condition)
|
||||
|
||||
@@ -86,7 +86,7 @@ def build_terminology_query(session: SessionDep, oid: int, name: Optional[str] =
|
||||
|
||||
if ds_filter_condition is not None and adv_filter_condition is not None:
|
||||
parent_ids_subquery = parent_ids_subquery.where(
|
||||
or_(ds_filter_condition, adv_filter_condition)
|
||||
and_(ds_filter_condition, adv_filter_condition)
|
||||
)
|
||||
elif ds_filter_condition is not None:
|
||||
parent_ids_subquery = parent_ids_subquery.where(ds_filter_condition)
|
||||
|
||||
Reference in New Issue
Block a user