From e74d8da6e190a73a0cb27764dda475d085bf9963 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Tue, 17 Sep 2024 11:29:39 +0200 Subject: [PATCH] Revert changes to Python code generation --- python/svix/api.py | 4 ++-- python/templates/model.py.jinja | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/svix/api.py b/python/svix/api.py index 1b1087b2c..4fd6a0852 100644 --- a/python/svix/api.py +++ b/python/svix/api.py @@ -1074,7 +1074,7 @@ async def create( with_content=False, **options.to_dict(), ) - ret.payload = MessageOutPayload.from_dict(message_in.payload.to_dict()) + ret.payload = message_in.payload return ret async def get(self, app_id: str, msg_id: str) -> MessageOut: @@ -1112,7 +1112,7 @@ def create( with_content=False, **options.to_dict(), ) - ret.payload = MessageOutPayload.from_dict(message_in.payload.to_dict()) + ret.payload = message_in.payload return ret def get(self, app_id: str, msg_id: str) -> MessageOut: diff --git a/python/templates/model.py.jinja b/python/templates/model.py.jinja index bca9550c9..745a64526 100644 --- a/python/templates/model.py.jinja +++ b/python/templates/model.py.jinja @@ -1,5 +1,5 @@ {% set class_name = model.class_info.name %} -{% if model.required_properties == [] and model.optional_properties == [] and False %} +{% if model.required_properties == [] and model.optional_properties == [] %} from typing import Any, Dict, Type, TypeVar T = TypeVar("T", bound="{{ class_name }}")