fix: dataset query created_by empty UUID in iteration subgraph (#34004) (#34044)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Achieve3318
2026-03-26 02:57:19 -04:00
committed by GitHub
parent c32eebf57d
commit 5341cd015b
8 changed files with 36 additions and 6 deletions

View File

@ -174,6 +174,18 @@ def normalize_uuid(value: str | UUID) -> str:
raise ValueError("must be a valid UUID") from exc
def parse_uuid_str_or_none(value: str | None) -> str | None:
"""
Return None for missing/empty UUID-like values.
Keep non-empty values unchanged to avoid changing behavior in paths that
currently pass placeholder IDs in tests/mocks.
"""
if value is None or not str(value).strip():
return None
return str(value)
UUIDStrOrEmpty = Annotated[str, AfterValidator(normalize_uuid)]