fix(api): reject explicit null strategy nick
Publish verified PortfolioHub image / verify (push) Canceled after 0s
Publish verified PortfolioHub image / publish (push) Canceled after 0s

This commit is contained in:
2026-08-16 00:03:25 +09:00
parent fe2dd3d15e
commit ee1af6ef49
2 changed files with 7 additions and 5 deletions
+2 -2
View File
@@ -326,7 +326,7 @@ class StrategyCreateRequest(BaseModel):
@classmethod
def normalize_nick(cls, value: str | None) -> str | None:
if value is None:
return None
raise ValueError("nick must not be null")
normalized = value.strip()
if not normalized:
raise ValueError("nick must not be blank")
@@ -345,7 +345,7 @@ class StrategyUpdateRequest(BaseModel):
@classmethod
def normalize_nick(cls, value: str | None) -> str | None:
if value is None:
return None
raise ValueError("nick must not be null")
normalized = value.strip()
if not normalized:
raise ValueError("nick must not be blank")