Skip to content

Commit

Permalink
fix: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hiohiohio committed Feb 4, 2025
1 parent 789d44d commit 29b49ba
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion alpaca/trading/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,15 @@ def __init__(self, **data: Any) -> None:

# mleg responses will give ''s that will need to be converted to None
# to avoid validation errors from pydantic
for k in ["asset_id", "symbol", "asset_class", "side", "position_intent", "type", "order_type"]:
for k in [
"asset_id",
"symbol",
"asset_class",
"side",
"position_intent",
"type",
"order_type",
]:
if k in data and data[k] == "":
data[k] = None

Expand Down

0 comments on commit 29b49ba

Please sign in to comment.