Skip to content

Commit b9c3bd1

Browse files
authored
Merge pull request #3 from 8times4/bugfix/fix-missing-ssh-key-ids
Fixed an exception when instance is initialized without ssh keys in .get_by_id
2 parents 5a98d64 + 41d33e6 commit b9c3bd1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

datacrunch/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '1.0.6'
1+
VERSION = '1.0.7'

datacrunch/instances/instances.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def get_by_id(self, id: str) -> Instance:
306306
ip=instance_dict['ip'],
307307
status=instance_dict['status'],
308308
created_at=instance_dict['created_at'],
309-
ssh_key_ids=instance_dict['ssh_key_ids'],
309+
ssh_key_ids=instance_dict['ssh_key_ids'] if 'ssh_key_ids' in instance_dict else [],
310310
startup_script_id=instance_dict['startup_script_id'] if 'startup_script_id' in instance_dict else None,
311311
cpu=instance_dict['cpu'],
312312
gpu=instance_dict['gpu'],

0 commit comments

Comments
 (0)