Skip to content

Commit 99f9a43

Browse files
author
Diego Ardila
committed
bugfixes
1 parent c4815d3 commit 99f9a43

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nucleus/dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ def create_slice(
221221
222222
:return: new Slice object
223223
"""
224-
if dataset_item_ids and reference_ids:
224+
if bool(dataset_item_ids) == bool(reference_ids):
225225
raise Exception(
226-
"You cannot specify both dataset_item_ids and reference_ids"
226+
"You must specify exactly one of dataset_item_ids or reference_ids."
227227
)
228228
payload: Dict[str, Any] = {NAME_KEY: name}
229229
if dataset_item_ids:

nucleus/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def serialize_and_write(
7777
):
7878
for unit in upload_unit:
7979
try:
80-
file_pointer.write(unit.to_json())
80+
file_pointer.write(unit.to_json() + "\n")
8181
except TypeError as e:
8282
type_name = type(unit).__name__
8383
message = (

0 commit comments

Comments
 (0)