Skip to content

Commit a766684

Browse files
committed
Use extended_json_encoder when dumping message contents everywhere
1 parent 16064a4 commit a766684

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/aleph/sdk/client/authenticated_http.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ async def _broadcast_deprecated(self, message_dict: Mapping[str, Any]) -> None:
215215

216216
async with self.http_session.post(
217217
url,
218-
json={"topic": "ALEPH-TEST", "data": json.dumps(message_dict)},
218+
json={"topic": "ALEPH-TEST", "data": json.dumps(message_dict, default=extended_json_encoder)},
219219
) as response:
220220
await self._handle_broadcast_deprecated_response(response)
221221

@@ -678,7 +678,7 @@ async def _storage_push_file_with_message(
678678
"sync": sync,
679679
}
680680
data.add_field(
681-
"metadata", json.dumps(metadata), content_type="application/json"
681+
"metadata", json.dumps(metadata, default=extended_json_encoder), content_type="application/json"
682682
)
683683
# Add the file
684684
data.add_field("file", file_content)

0 commit comments

Comments
 (0)