Skip to content

Commit bff1a93

Browse files
Merge pull request #585 from latchbio/anirudh/typecast
type cast sample id
2 parents 0c4dbe0 + e38c4ef commit bff1a93

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ Types of changes
1616

1717
# Latch SDK Changelog
1818

19+
## 2.69.1 - 2026-03-02
20+
21+
### Fixed
22+
23+
* Fix registry link values storing `sampleId` as number instead of string
24+
1925
## 2.69.0 - 2026-03-02
2026

2127
### Added

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ include = ["src/**/*.py", "src/**/py.typed", "src/latch_cli/services/init/*"]
1212

1313
[project]
1414
name = "latch"
15-
version = "2.69.0"
15+
version = "2.69.1"
1616
description = "The Latch SDK"
1717
authors = [{ name = "Kenny Workman", email = "kenny@latch.bio" }]
1818
maintainers = [{ name = "Ayush Kamat", email = "ayush@latch.bio" }]

src/latch/registry/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def to_python_literal(registry_literal: DBValue, registry_type: RegistryType):
150150

151151
from latch.registry.record import Record
152152

153-
return Record(value["sampleId"])
153+
return Record(str(value["sampleId"]))
154154

155155
if primitive == "string":
156156
if isinstance(value, str):
@@ -322,7 +322,7 @@ def to_registry_literal(
322322
"cannot convert non-record python literal to registry link"
323323
)
324324

325-
value = {"sampleId": python_literal.id}
325+
value = {"sampleId": str(python_literal.id)}
326326
elif primitive == "blob":
327327
if not (
328328
isinstance(python_literal, LatchFile)

0 commit comments

Comments
 (0)