-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Exception is raised when attempting to get a node that is not in Ground. Correct behavior should be returning None.
In [3]: gc.get_node('albert')
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-ca0ec4e6f6f0> in <module>()
----> 1 gc.get_node('albert')
~/anaconda/envs/py36/lib/python3.6/site-packages/ground_client-0.1.2-py3.6.egg/ground/client.py in get_node(self, source_key)
215
216 def get_node(self, source_key):
--> 217 return model.core.node.Node(self._get_item("nodes", source_key))
218
219 def get_node_latest_versions(self, source_key):
~/anaconda/envs/py36/lib/python3.6/site-packages/ground_client-0.1.2-py3.6.egg/ground/common/model/core/node.py in __init__(self, json_payload)
5
6 def __init__(self, json_payload):
----> 7 super().__init__(json_payload)
8
9 self._name = json_payload.get('name', '')
~/anaconda/envs/py36/lib/python3.6/site-packages/ground_client-0.1.2-py3.6.egg/ground/common/model/version/item.py in __init__(self, json_payload)
4
5 def __init__(self, json_payload):
----> 6 self._id = json_payload.get('id') or 0
7 self._tags = json_payload.get('tags') or {}
8
AttributeError: 'NoneType' object has no attribute 'get'
Metadata
Metadata
Assignees
Labels
No labels