Skip to content

Commit b8e3747

Browse files
Micaela GoddardMicaela Goddard
authored andcommitted
price_per_hour KeyError error handling correction
1 parent fc09fed commit b8e3747

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

datacrunch/instances/instances.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def get(self, status: str = None) -> List[Instance]:
288288
id=instance_dict['id'],
289289
instance_type=instance_dict['instance_type'],
290290
image=instance_dict['image'],
291-
price_per_hour=instance_dict['price_per_hour'],
291+
price_per_hour=instance_dict['price_per_hour'] if 'price_per_hour' in instance_dict else None,
292292
location=instance_dict['location'],
293293
hostname=instance_dict['hostname'],
294294
description=instance_dict['description'],

0 commit comments

Comments
 (0)