Api v1.14.0 (#1398)

* fix(chalice): cast note's session_id to string

* fix(chalice): cast all session_id to string

* fix(chalice): fixed content-length after cast all session_id to string
This commit is contained in:
Kraiem Taha Yassine 2023-07-10 16:01:28 +01:00 committed by GitHub
parent 4020f6b16e
commit da627bdb9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -34,8 +34,9 @@ class ORRoute(APIRoute):
if isinstance(response, JSONResponse):
response: JSONResponse = response
body = json.loads(response.body.decode('utf8'))
body=helper.cast_session_id_to_string(body)
response = JSONResponse(content=body, status_code=response.status_code, headers=response.headers,
body = helper.cast_session_id_to_string(body)
response = JSONResponse(content=body, status_code=response.status_code,
headers={k: v for k, v in response.headers.items() if k != "content-length"},
media_type=response.media_type, background=response.background)
if response.status_code == 200 \
and body is not None and isinstance(body, dict) \

View file

@ -39,7 +39,8 @@ class ORRoute(APIRoute):
response: JSONResponse = response
body = json.loads(response.body.decode('utf8'))
body = helper.cast_session_id_to_string(body)
response = JSONResponse(content=body, status_code=response.status_code, headers=response.headers,
response = JSONResponse(content=body, status_code=response.status_code,
headers={k: v for k, v in response.headers.items() if k != "content-length"},
media_type=response.media_type, background=response.background)
if response.status_code == 200 \
and body is not None and isinstance(body, dict) \