Skip to content

Commit cfca30d

Browse files
rakduttakevalmahajan
authored andcommitted
conflict resolve
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
1 parent a513420 commit cfca30d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

mcpgateway/services/server_service.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,18 +481,13 @@ async def register_server(
481481
elif resource_ids:
482482
# Use single query for single item (maintains test compatibility)
483483
resource_obj = db.get(DbResource, resource_ids[0])
484-
# for resource_id in server_in.associated_resources:
485-
# if resource_id.strip() == "":
486-
# continue
487-
# # Resource IDs are stored as string UUID hex values, not integers.
488-
# resource_obj = db.get(DbResource, resource_id)
489484
if not resource_obj:
490485
raise ServerError(f"Resource with id {resource_ids[0]} does not exist.")
491486
db_server.resources.append(resource_obj)
492487

493488
# Associate prompts, verifying each exists using bulk query when multiple items
494489
if server_in.associated_prompts:
495-
prompt_ids = [int(prompt_id.strip()) for prompt_id in server_in.associated_prompts if prompt_id.strip()]
490+
prompt_ids = [prompt_id.strip() for prompt_id in server_in.associated_prompts if prompt_id.strip()]
496491
if len(prompt_ids) > 1:
497492
# Use bulk query for multiple items
498493
prompts = db.execute(select(DbPrompt).where(DbPrompt.id.in_(prompt_ids))).scalars().all()

0 commit comments

Comments
 (0)