Skip to content

fix: Keep quantities in to_list of Cargo Movement search#562

Merged
alexspeddingvortexa merged 3 commits intomasterfrom
return-all-quantities
Apr 17, 2026
Merged

fix: Keep quantities in to_list of Cargo Movement search#562
alexspeddingvortexa merged 3 commits intomasterfrom
return-all-quantities

Conversation

@alexspeddingvortexa
Copy link
Copy Markdown
Contributor

The CargoMovement model is a Pydantic BaseModel. When to_list() calls CargoMovement(**raw_dict), Pydantic only keeps fields that are declared on the model — anything else in the raw dict is silently dropped.

By adding the 7 missing fields to the model, Pydantic now recognises them during parsing and populates them instead of discarding them.

Copilot AI review requested due to automatic review settings April 17, 2026 11:12
@alexspeddingvortexa alexspeddingvortexa changed the title chore: Keep quantities in to_list of Cargo Movement search fix: Keep quantities in to_list of Cargo Movement search Apr 17, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the SDK’s Cargo Movement Pydantic model so that quantity-related fields returned by the API are preserved when converting search results to typed objects via .to_list() (instead of being dropped as undeclared extras).

Changes:

  • Add 7 missing quantity/discharge quantity fields to CargoMovement so Pydantic retains them during parsing.
  • Document unit behavior for quantity vs explicit-unit quantity fields in the model.
  • Bump SDK version from 1.0.23 to 1.0.24.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
vortexasdk/version.py Version bump to publish the fix.
vortexasdk/api/cargo_movement.py Declares missing quantity fields on the CargoMovement model so .to_list() retains them.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread vortexasdk/api/cargo_movement.py
@alexspeddingvortexa alexspeddingvortexa merged commit 6f92801 into master Apr 17, 2026
11 of 12 checks passed
@alexspeddingvortexa alexspeddingvortexa deleted the return-all-quantities branch April 17, 2026 12:37
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.

3 participants