Skip to content

feat(backend): Add generic API helper for transitions - #12693

Open
matmair wants to merge 22 commits into
inventree:masterfrom
matmair:add-generic-transaction
Open

feat(backend): Add generic API helper for transitions#12693
matmair wants to merge 22 commits into
inventree:masterfrom
matmair:add-generic-transaction

Conversation

@matmair

@matmair matmair commented Aug 23, 2026

Copy link
Copy Markdown
Member

This PR adds a generic viewset mixin that enables writing much more concise APIs when using FSM transitions - follow up to #12317

@netlify

netlify Bot commented Aug 23, 2026

Copy link
Copy Markdown

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

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

@matmair matmair added api Relates to the API refactor labels Aug 23, 2026
@matmair matmair added this to the 1.6.0 milestone Aug 23, 2026
@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.00000% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.96%. Comparing base (f9f9f74) to head (a054936).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12693      +/-   ##
==========================================
- Coverage   87.08%   86.96%   -0.12%     
==========================================
  Files        1483     1482       -1     
  Lines      100213    99734     -479     
  Branches    11609    11285     -324     
==========================================
- Hits        87270    86738     -532     
- Misses      12878    12930      +52     
- Partials       65       66       +1     
Flag Coverage Δ
backend 91.06% <84.00%> (-0.04%) ⬇️

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

Components Coverage Δ
Backend Apps 92.22% <83.48%> (-0.16%) ⬇️
Backend General 93.45% <82.52%> (-1.07%) ⬇️
Frontend 79.53% <ø> (-0.24%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@matmair

matmair commented Aug 23, 2026

Copy link
Copy Markdown
Member Author

@SchrodingersGat @wolflu05 what do you think about this approach? I use it in some of my plugins, it was partially implemented automatically by Claude due to the high level of duplication in a model with a lot of transitions

@matmair matmair changed the title feat(backend): Add generic api helper for transitions feat(backend): Add generic API helper for transitions Aug 23, 2026
@matmair matmair mentioned this pull request Aug 23, 2026
@matmair
matmair marked this pull request as ready for review August 26, 2026 22:40
@matmair

matmair commented Aug 27, 2026

Copy link
Copy Markdown
Member Author

@SchrodingersGat ready for review

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

Labels

api Relates to the API refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant