Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit a228e2b

Browse files
committed
volume: use self.plan.slug for plan param
`class Plan(object)` is not json serializable, the correct action is to pass it the slug either explicitly or via str(self.plan). fixes #28
1 parent f839e27 commit a228e2b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packet/Volume.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __init__(self, data, manager):
2828
self.attached_to = None
2929

3030
def update(self):
31-
params = {"description": self.description, "size": self.size, "plan": self.plan, "locked": self.locked}
31+
params = {"description": self.description, "size": self.size, "plan": self.plan.slug, "locked": self.locked}
3232

3333
return self.manager.call_api("storage/%s" % self.id, type='PATCH', params=params)
3434

0 commit comments

Comments
 (0)