Skip to content

[bug] Fix lookup error in API - #12868

Closed
SchrodingersGat wants to merge 1 commit into
inventree:masterfrom
SchrodingersGat:po-fix
Closed

SchrodingersGat wants to merge 1 commit into
inventree:masterfrom
SchrodingersGat:po-fix

Conversation

@SchrodingersGat

Copy link
Copy Markdown
Member

Fixes order dependency bug on the PurchaseOrder API viewset. This caused the /api/po/status/ endpoint to return 404 - because of a duplicate "match" against the pk endpoint

By ensuring that the pk field is always integer based we avoid this bug completely. Also added regression test

@SchrodingersGat SchrodingersGat added this to the 1.6.0 milestone Sep 17, 2026
@SchrodingersGat SchrodingersGat added bug Identifies a bug which needs to be addressed api Relates to the API labels Sep 17, 2026
@netlify

netlify Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

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

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

@codecov

codecov Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.26%. Comparing base (3a0ade3) to head (3562651).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12868   +/-   ##
=======================================
  Coverage   87.26%   87.26%           
=======================================
  Files        1502     1502           
  Lines      102169   102180   +11     
  Branches    11661    11661           
=======================================
+ Hits        89156    89166   +10     
- Misses      12948    12949    +1     
  Partials       65       65           
Flag Coverage Δ
backend 91.87% <100.00%> (-0.01%) ⬇️

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

Components Coverage Δ
Backend Apps 92.53% <100.00%> (-0.01%) ⬇️
Backend General 94.69% <ø> (-0.03%) ⬇️
Frontend 79.82% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat SchrodingersGat mentioned this pull request Sep 19, 2026
@SchrodingersGat

Copy link
Copy Markdown
Member Author

Replaced by #12885

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

Labels

api Relates to the API bug Identifies a bug which needs to be addressed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant