Skip to content

Comments

tpluspy: support attached trigger orders#132

Open
farnyser wants to merge 1 commit intomainfrom
attached-trigger-orders
Open

tpluspy: support attached trigger orders#132
farnyser wants to merge 1 commit intomainfrom
attached-trigger-orders

Conversation

@farnyser
Copy link
Collaborator

No description provided.

@farnyser farnyser requested a review from antazoey February 23, 2026 15:34
@farnyser farnyser self-assigned this Feb 23, 2026
@farnyser farnyser force-pushed the attached-trigger-orders branch from d950089 to 5dec806 Compare February 23, 2026 15:52

@model_serializer
def serialize_model(self) -> dict[str, dict[str, Any] | str]:
if self.parent_order_id is not None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is exclude_none=True kwarg on model dump, just as fyi
also can simplify this

data = {"trigger": self.trigger.serialize_model()}
if self.parent_order_id is not None:
    data["parent_order_id"] = self.parent_order_id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants