Skip to content

Handle list returns from creating StockItems #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

1337joe
Copy link
Contributor

@1337joe 1337joe commented Jul 23, 2025

Since inventree/InvenTree#9857 the StockItem create API has been able to return multiple items for a single call. The python API was not updated to handle this (as tested by the first commit on this branch), which blocked my attempt at fixing the annotations to generate a usable API schema (inventree/InvenTree#9969).

Breaking: This PR changes StockItem create to always return a list of items.

With these changes both master and inventree/InvenTree#9969 are able to pass the API tests.

As always, let me know if anything needs to change to fit Python conventions/project style/etc.

@1337joe 1337joe changed the title Fix stock create list return Handle list returns from creating StockItems Jul 23, 2025
@SchrodingersGat SchrodingersGat added the breaking Breaking change label Jul 25, 2025
@SchrodingersGat
Copy link
Member

@1337joe thanks for submitting the fix here too

@SchrodingersGat SchrodingersGat merged commit 58b0617 into inventree:master Jul 25, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants