Skip to content

Commit f0a5697

Browse files
authored
Merge pull request #26 from DIMO-Network/fix-token-exchange
Fix token exchange
2 parents b953c0b + a630496 commit f0a5697

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

dimo/api/token_exchange.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from dimo.constants import dimo_constants
22
from dimo.errors import check_type, check_optional_type
33
from dimo.permission_decoder import PermissionDecoder
4+
import json
45

56

67
class TokenExchange:
@@ -17,6 +18,8 @@ def __init__(
1718
def _decode_vehicle_permissions(self, token_id: int, client_id: str) -> dict:
1819
response = self._identity.check_vehicle_privileges(token_id)
1920
try:
21+
# If response is bytes
22+
response = json.loads(response.decode('utf-8'))
2023
nodes = (
2124
response.get("data", {})
2225
.get("vehicle", {})

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "dimo-python-sdk"
7-
version = "1.3.3"
7+
version = "1.3.4"
88
authors = [
99
{ name="Barrett Kowalsky", email="[email protected]" },
1010
]

0 commit comments

Comments
 (0)