Skip to content

Commit 6e5225c

Browse files
committed
Fix wrong content on get_estimated_price
1 parent 5a586c1 commit 6e5225c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/aleph/sdk/client/http.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,11 @@ async def get_estimated_price(
462462
self,
463463
content: ExecutableContent,
464464
) -> PriceResponse:
465+
cleaned_content = content.dict(exclude_none=True)
465466
item_content: str = json.dumps(
466-
content, separators=(",", ":"), default=extended_json_encoder
467+
cleaned_content,
468+
separators=(",", ":"),
469+
default=extended_json_encoder,
467470
)
468471
message = parse_message(
469472
dict(
@@ -474,7 +477,7 @@ async def get_estimated_price(
474477
if isinstance(content, ProgramContent)
475478
else MessageType.instance
476479
),
477-
content=content.dict(exclude_none=True),
480+
content=cleaned_content,
478481
item_content=item_content,
479482
time=time.time(),
480483
channel=settings.DEFAULT_CHANNEL,

0 commit comments

Comments
 (0)