Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions services/catalog/rs_server_catalog/user_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,12 @@ async def manage_search_request( # pylint: disable=too-many-statements,too-many
if not await self.collection_exists(request, collection):
content["collections"][i] = f"{self.request_ids['owner_id']}_{collection}"
logger.debug(f"Using collection name: {content['collections'][i]}")
# Check the existence of the collection after concatenation of owner_id
if not await self.collection_exists(request, content["collections"][i]):
raise log_http_exception(
status_code=HTTP_404_NOT_FOUND,
detail=f"Collection {collection} not found.",
)

self.request_ids["collection_ids"] = content["collections"]
request = self.override_request_body(request, content)
Expand Down Expand Up @@ -571,6 +577,13 @@ async def manage_search_request( # pylint: disable=too-many-statements,too-many
for i, collection in enumerate(coll_list):
if not await self.collection_exists(request, collection):
coll_list[i] = f"{self.request_ids['owner_id']}_{collection}"
logger.debug(f"Using collection name: {coll_list[i]}")
# Check the existence of the collection after concatenation of owner_id
if not await self.collection_exists(request, coll_list[i]):
raise log_http_exception(
status_code=HTTP_404_NOT_FOUND,
detail=f"Collection {collection} not found.",
)

self.request_ids["collection_ids"] = coll_list
query_params_dict["collections"] = ",".join(coll_list)
Expand Down