Skip to content

Commit 595d6fb

Browse files
author
Claire Pajot
committed
Minor fixes
1 parent a99859e commit 595d6fb

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

nucleus/annotation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ def __post_init__(self):
307307
@classmethod
308308
def from_json(cls, payload: dict):
309309
return cls(
310-
label=payload.get(LABEL_KEY, 0),
311-
taxonomy_name=payload.get(TAXONOMY_NAME_KEY, None),
310+
label=payload[LABEL_KEY],
311+
taxonomy_name=payload[TAXONOMY_NAME_KEY],
312312
reference_id=payload[REFERENCE_ID_KEY],
313313
metadata=payload.get(METADATA_KEY, {}),
314314
)

tests/test_annotation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def dataset(CLIENT):
6464
"category",
6565
[f"[Pytest] Category Label ${i}" for i in range((len(TEST_IMG_URLS)))],
6666
)
67-
assert ERROR_PAYLOAD not in response.json()
6867
yield ds
6968

7069
response = CLIENT.delete_dataset(ds.id)

0 commit comments

Comments
 (0)