From ea2eb1172f782e9106248555fd45608e26862f9e Mon Sep 17 00:00:00 2001 From: Andrea Mistrali Date: Tue, 17 Dec 2024 12:06:47 +0100 Subject: [PATCH] Fix policy upload --- hsapi_client/policies.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hsapi_client/policies.py b/hsapi_client/policies.py index 9d0f672..a18f773 100644 --- a/hsapi_client/policies.py +++ b/hsapi_client/policies.py @@ -18,7 +18,7 @@ class Policy(HSAPICall): response = self.call('get') return v1Policy(**response.json()) - def put(self, data: v1Policy) -> v1Policy: - policy_txt = v1PutPolicyResponse(policy=data.json) + def put(self, data: str) -> v1Policy: + policy_txt = v1PutPolicyResponse(policy=data) response = self.call('put', data=policy_txt) return v1Policy(**response.json())