Skip to content

Commit 23bac44

Browse files
fix
1 parent 264979b commit 23bac44

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

services/web/server/src/simcore_service_webserver/conversations/_controller/_conversations_rest.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,7 @@ async def update_conversation(request: web.Request):
190190
app=request.app,
191191
project_id=None, # Support conversations don't use project_id
192192
conversation_id=path_params.conversation_id,
193-
updates=ConversationPatchDB(
194-
name=body_params.name, extra_context=body_params.extra_context
195-
),
193+
updates=ConversationPatchDB(**body_params.model_dump(exclude_unset=True)),
196194
)
197195

198196
data = ConversationRestGet.from_domain_model(conversation)

services/web/server/tests/unit/with_dbs/04/conversations/test_conversations_rest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ async def test_conversations_update_and_delete(
211211
conversation_id=first_conversation_id
212212
)
213213
updated_name = "Updated Support Request - Bug Report"
214-
resp = await client.put(
214+
resp = await client.patch(
215215
f"{update_url}?type=SUPPORT",
216216
json={"name": updated_name},
217217
)
@@ -351,7 +351,7 @@ async def test_conversations_access_control(
351351
update_url = client.app.router["update_conversation"].url_for(
352352
conversation_id=conversation_id
353353
)
354-
resp = await client.put(
354+
resp = await client.patch(
355355
f"{update_url}?type=SUPPORT",
356356
json={"name": "Unauthorized update attempt"},
357357
)
@@ -394,7 +394,7 @@ async def test_conversations_error_handling(
394394
update_url = client.app.router["update_conversation"].url_for(
395395
conversation_id=fake_conversation_id
396396
)
397-
resp = await client.put(
397+
resp = await client.patch(
398398
f"{update_url}?type=SUPPORT",
399399
json={"name": "Update non-existent"},
400400
)
@@ -434,7 +434,7 @@ async def test_conversations_without_type_query_param(
434434
update_url = client.app.router["update_conversation"].url_for(
435435
conversation_id=conversation_id
436436
)
437-
resp = await client.put(f"{update_url}", json={"name": "Updated"})
437+
resp = await client.patch(f"{update_url}", json={"name": "Updated"})
438438
await assert_status(resp, status.HTTP_422_UNPROCESSABLE_ENTITY)
439439

440440
delete_url = client.app.router["delete_conversation"].url_for(

0 commit comments

Comments
 (0)