Skip to content

Commit

Permalink
🐞 fix: body not in message
Browse files Browse the repository at this point in the history
  • Loading branch information
mic1on committed Oct 26, 2023
1 parent f099a6e commit 47ba3cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "onestep"
version = "0.3.21"
version = "0.3.22"
description = ""
authors = ["miclon <jcnd@163.com>"]
readme = "README.md"
Expand Down
3 changes: 3 additions & 0 deletions src/onestep/broker/rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ def _to_message(self, data: amqpstorm.Message):
if not isinstance(message, dict):
message = {"body": message}

if "body" not in message:
message["body"] = message

return Message(body=message.get("body"), extra=message.get("extra"), msg=data)

0 comments on commit 47ba3cf

Please sign in to comment.