Skip to content

Fix race condition for take_stock method - #12718

Merged
SchrodingersGat merged 1 commit into
inventree:masterfrom
SchrodingersGat:take-stock-fix
Aug 27, 2026
Merged

SchrodingersGat merged 1 commit into
inventree:masterfrom
SchrodingersGat:take-stock-fix

Conversation

@SchrodingersGat

Copy link
Copy Markdown
Member

Fixes bug in StockItem.take_stock which could lead to over-consumption of stock in the case of concurrent access.

@SchrodingersGat SchrodingersGat added this to the 1.6.0 milestone Aug 27, 2026
@SchrodingersGat SchrodingersGat added bug Identifies a bug which needs to be addressed stock Related to Stock models backport Apply this label to a PR to enable auto-backport action backport-to-1.5.x labels Aug 27, 2026
@netlify

netlify Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit 9687dd7
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6a8fb93d4b42f000080df1c8

@codecov

codecov Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 19.04762% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.77%. Comparing base (39f2d72) to head (9687dd7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12718      +/-   ##
==========================================
- Coverage   86.79%   86.77%   -0.03%     
==========================================
  Files        1456     1456              
  Lines       97756    97797      +41     
  Branches    11337    11337              
==========================================
+ Hits        84852    84859       +7     
- Misses      12838    12872      +34     
  Partials       66       66              
Flag Coverage Δ
backend 90.83% <19.04%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Backend Apps 92.20% <19.04%> (-0.07%) ⬇️
Backend General 93.78% <ø> (ø)
Frontend 79.63% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat
SchrodingersGat merged commit 2dca27f into inventree:master Aug 27, 2026
46 checks passed
@SchrodingersGat
SchrodingersGat deleted the take-stock-fix branch August 27, 2026 05:01
@github-actions

Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
✅ 1.5.x

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

SchrodingersGat added a commit that referenced this pull request Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Apply this label to a PR to enable auto-backport action backport-to-1.5.x bug Identifies a bug which needs to be addressed stock Related to Stock models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant