diff --git a/bugout/__init__.py b/bugout/__init__.py index 0590aa3..65cb141 100644 --- a/bugout/__init__.py +++ b/bugout/__init__.py @@ -1,13 +1,14 @@ """ Bugout Python API """ + __author__ = "Bugout" __maintainer__ = __author__ __description__ = "Python client library for Bugout API" __email__ = "engineering@bugout.dev" __license__ = "MIT" -__version__ = "0.2.14" +__version__ = "0.2.15" __all__ = ( "__author__", diff --git a/bugout/resource.py b/bugout/resource.py index 02cd667..dc81671 100644 --- a/bugout/resource.py +++ b/bugout/resource.py @@ -1,3 +1,4 @@ +import json import uuid from typing import Any, Dict, Optional, Union @@ -129,7 +130,10 @@ def add_resource_holder_permissions( "Authorization": f"Bearer {token}", } result = self._call( - method=Method.post, path=path, headers=headers, json=holder_permissions + method=Method.post, + path=path, + headers=headers, + json=json.loads(holder_permissions.json(by_alias=True)), ) return BugoutResourceHolders(**result) @@ -144,6 +148,9 @@ def delete_resource_holder_permissions( "Authorization": f"Bearer {token}", } result = self._call( - method=Method.delete, path=path, headers=headers, json=holder_permissions + method=Method.delete, + path=path, + headers=headers, + json=json.loads(holder_permissions.json(by_alias=True)), ) return BugoutResourceHolders(**result)