Skip to content

Commit 570a8e8

Browse files
committed
add backend filter
1 parent 9e65a90 commit 570a8e8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

backend/btrixcloud/colls.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ async def list_collections(
537537
sort_direction: int = 1,
538538
name: Optional[str] = None,
539539
name_prefix: Optional[str] = None,
540+
has_dedupe_index: Optional[bool] = None,
540541
access: Optional[str] = None,
541542
headers: Optional[dict] = None,
542543
):
@@ -554,6 +555,9 @@ async def list_collections(
554555
regex_pattern = f"^{name_prefix}"
555556
match_query["name"] = {"$regex": regex_pattern, "$options": "i"}
556557

558+
if has_dedupe_index is not None:
559+
match_query["hasDedupeIndex"] = has_dedupe_index
560+
557561
if public_colls_out:
558562
match_query["access"] = CollAccessType.PUBLIC
559563
elif access:
@@ -1121,6 +1125,7 @@ async def list_collection_all(
11211125
sortDirection: int = 1,
11221126
name: Optional[str] = None,
11231127
namePrefix: Optional[str] = None,
1128+
hasDedupeIndex: Optional[bool] = None,
11241129
access: Optional[str] = None,
11251130
):
11261131
# pylint: disable=duplicate-code
@@ -1132,6 +1137,7 @@ async def list_collection_all(
11321137
sort_direction=sortDirection,
11331138
name=name,
11341139
name_prefix=namePrefix,
1140+
has_dedupe_index=hasDedupeIndex,
11351141
access=access,
11361142
headers=dict(request.headers),
11371143
)

0 commit comments

Comments
 (0)