Skip to content

Commit ac6e3da

Browse files
committed
WIP handle boolean types correctly by:
* Taking in and checking for Boolean types and * converting them to Swagger boolean in params body and * loading params JSOn into object to be iterable in base.py
1 parent bb61d7c commit ac6e3da

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

aries_cloudcontroller/controllers/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def handle_output(self, *output, source: str = None, **kwargs):
5555
async def admin_request(
5656
self, method, path, json_data=None, text=False, params=None, data=None
5757
) -> ClientResponse:
58+
params = json.loads(params)
5859
params = {k: v for (k, v) in (params or {}).items() if v is not None}
5960
async with self.client_session.request(
6061
method, self.admin_url + path, json=json_data, params=params, data=data

aries_cloudcontroller/controllers/connections.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ async def create_invitation(
7474
params = {}
7575
if alias:
7676
params["alias"] = alias
77-
if auto_accept:
77+
if auto_accept in [True, False]:
78+
auto_accept = str(auto_accept).lower()
7879
params["auto_accept"] = auto_accept
7980
if public in [True, False]:
8081
public = str(public).lower()

0 commit comments

Comments
 (0)