model_dump() needs to use mode="json"
This commit is contained in:
parent
6ecfa78c5d
commit
03426c1989
4 changed files with 4 additions and 4 deletions
|
@ -364,7 +364,7 @@ class MeshConsumer(AsyncWebsocketConsumer):
|
|||
"""
|
||||
|
||||
async def log_received_message(self, src_node: MeshNode, msg: messages.MeshMessage):
|
||||
as_json = msg.model_dump()
|
||||
as_json = msg.model_dump(mode="json")
|
||||
await self.channel_layer.group_send("mesh_msg_received", {
|
||||
"type": "mesh.msg_received",
|
||||
"timestamp": timezone.now().strftime("%d.%m.%y %H:%M:%S.%f"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue