fix(worker): reuse shared hub fake and guard blank list name

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-05-30 13:51:34 +02:00
parent 53f4e2de0f
commit ac2f1d824e
2 changed files with 3 additions and 26 deletions

View File

@@ -47,6 +47,8 @@ public sealed class ListMcpTools
var entity = await _lists.GetByIdAsync(listId, cancellationToken)
?? throw new InvalidOperationException($"List {listId} not found.");
if (name is not null && string.IsNullOrWhiteSpace(name))
throw new InvalidOperationException("name cannot be blank.");
if (name is not null) entity.Name = name;
if (workingDir is not null)
entity.WorkingDir = string.IsNullOrWhiteSpace(workingDir) ? null : workingDir;