Skip to content

Handle transition errors which occur after valid transition - #13303

Merged
SchrodingersGat merged 1 commit into
inventree:masterfrom
SchrodingersGat:transition-fix
Nov 17, 2026
Merged

SchrodingersGat merged 1 commit into
inventree:masterfrom
SchrodingersGat:transition-fix

Conversation

@SchrodingersGat

Copy link
Copy Markdown
Member

When running through a django-fsm transition, if an error occurs after a valid transition (i.e. in the object.save() method) - that error message is hidden from the user entirely, providing no information about what is truly blocking the transition.

In this case, the actual transition has passed successfully, but calling save() afterwards fails for some other reason. For example, a custom validator on the model's save() method, or a failed uniqueness check.

This PR enables those messages to be captured, if the transition actually succeeds but is followed by another error.

@netlify

netlify Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit 3e9cd2b
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6afc17dd6f469b192495671a
😎 Deploy Preview https://deploy-preview-13303--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 93 (🟢 up 1 from production)
Accessibility: 82 (no change from production)
Best Practices: 92 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@SchrodingersGat SchrodingersGat added bug Identifies a bug which needs to be addressed backport Apply this label to a PR to enable auto-backport action backport-to-1.7.x Apply this label to backport a PR to the 1.7.x branch labels Nov 17, 2026
@SchrodingersGat SchrodingersGat added this to the 1.8.0 milestone Nov 17, 2026
@codecov

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.34%. Comparing base (dfc5ca9) to head (3e9cd2b).
⚠️ Report is 1 commits behind head on master.

❌ Your patch check has failed because the patch coverage (78.57%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #13303   +/-   ##
=======================================
  Coverage   90.33%   90.34%           
=======================================
  Files         901      901           
  Lines       83354    83380   +26     
  Branches     4284     4284           
=======================================
+ Hits        75300    75327   +27     
+ Misses       7038     7037    -1     
  Partials     1016     1016           
Flag Coverage Δ
backend 93.88% <88.88%> (+<0.01%) ⬆️

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

Components Coverage Δ
Backend Apps 94.38% <88.88%> (-0.01%) ⬇️
Backend General 95.49% <78.57%> (-0.02%) ⬇️
Frontend 77.38% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat
SchrodingersGat merged commit a47db7e into inventree:master Nov 17, 2026
49 of 50 checks passed
@SchrodingersGat
SchrodingersGat deleted the transition-fix branch November 17, 2026 10:43
@github-actions

Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
✅ 1.7.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 Nov 17, 2026
…13310)

(cherry picked from commit a47db7e)

Co-authored-by: Oliver <[email protected]>
Co-authored-by: Matthias Mair <[email protected]>
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.7.x Apply this label to backport a PR to the 1.7.x branch bug Identifies a bug which needs to be addressed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants