Skip to content

Commit

Permalink
Use extended_json_encoder when dumping message contents everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
MHHukiewitz committed Nov 27, 2023
1 parent 16064a4 commit a766684
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aleph/sdk/client/authenticated_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ async def _broadcast_deprecated(self, message_dict: Mapping[str, Any]) -> None:

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

Expand Down Expand Up @@ -678,7 +678,7 @@ async def _storage_push_file_with_message(
"sync": sync,
}
data.add_field(
"metadata", json.dumps(metadata), content_type="application/json"
"metadata", json.dumps(metadata, default=extended_json_encoder), content_type="application/json"
)
# Add the file
data.add_field("file", file_content)
Expand Down

0 comments on commit a766684

Please sign in to comment.