Skip to content

Commit 07f3d35

Browse files
committed
Proxy/get_object: handling no object (None)
1 parent 218f8a3 commit 07f3d35

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ With older versions of the DataLab server, some features may not work.
99

1010
* Added `keep_roi` argument to `SimpleRemoteProxy.delete_metadata` method
1111

12+
🛠️ Bug fixes:
13+
14+
* Fixed `SimpleRemoteProxy.get_object` method when there is no object to return
15+
(`None` is returned instead of an exception)
16+
1217
## Version 0.7.0 ##
1318

1419
DataLab Simple Client is fully compatible with **DataLab 0.10.0** and above.

cdlclient/remote.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,8 @@ def get_object(
451451
KeyError: if object not found
452452
"""
453453
param_data = self._cdl.get_object(nb_id_title, panel)
454+
if param_data is None:
455+
return None
454456
return json_to_dataset(param_data)
455457

456458
def get_object_shapes(

0 commit comments

Comments
 (0)