Skip to content

[bug] Unique constraint for serial numbers - #12483

Merged
SchrodingersGat merged 4 commits into
inventree:masterfrom
SchrodingersGat:unique-serial-bug
Jul 28, 2026
Merged

SchrodingersGat merged 4 commits into
inventree:masterfrom
SchrodingersGat:unique-serial-bug

Conversation

@SchrodingersGat

@SchrodingersGat SchrodingersGat commented Jul 27, 2026 •

Copy link
Copy Markdown
Member

Prevent creation of duplicate serial numbers via concurrent write operations.

Issue reported by @nullbenny

Issue Description

Because database-level constraints do not exist for serial number uniqueness validation, it is possible to create duplicate serial numbers via concurrent requests (e.g. via the API).

@SchrodingersGat SchrodingersGat added this to the 1.5.0 milestone Jul 27, 2026
@SchrodingersGat SchrodingersGat added the bug Identifies a bug which needs to be addressed label Jul 27, 2026
@netlify

netlify Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 2101f1c
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6a683a31ccf0c2000878f3ad
😎 Deploy Preview https://deploy-preview-12483--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: 97 (no change from production)
Accessibility: 81 (no change from production)
Best Practices: 100 (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 marked this pull request as draft July 27, 2026 22:25
@SchrodingersGat SchrodingersGat changed the title Unique constraint for serial numbers [bug] Unique constraint for serial numbers Jul 27, 2026
@codecov

codecov Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 23.78378% with 141 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.73%. Comparing base (4a8ee54) to head (2101f1c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12483      +/-   ##
==========================================
- Coverage   86.79%   86.73%   -0.06%     
==========================================
  Files        1443     1443              
  Lines       95858    95971     +113     
  Branches    11214    11094     -120     
==========================================
+ Hits        83203    83245      +42     
- Misses      12591    12661      +70     
- Partials       64       65       +1     
Flag Coverage Δ
backend 90.75% <23.78%> (-0.23%) ⬇️

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

Components Coverage Δ
Backend Apps 92.16% <23.78%> (-0.27%) ⬇️
Backend General 93.53% <ø> (ø)
Frontend 79.67% <ø> (+0.14%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat
SchrodingersGat marked this pull request as ready for review July 28, 2026 05:33
@SchrodingersGat
SchrodingersGat merged commit 6302748 into inventree:master Jul 28, 2026
40 checks passed
@SchrodingersGat
SchrodingersGat deleted the unique-serial-bug branch July 28, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Identifies a bug which needs to be addressed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant