Skip to content

[bug] Bulk import fix - #12898

Merged
SchrodingersGat merged 2 commits into
inventree:masterfrom
SchrodingersGat:bulk-import-fix
Sep 21, 2026
Merged

SchrodingersGat merged 2 commits into
inventree:masterfrom
SchrodingersGat:bulk-import-fix

Conversation

@SchrodingersGat

Copy link
Copy Markdown
Member

Fixes a significant bug in the recently added "--bulk" option for data import.

Any date fields with auto_now or auto_now_add were overwritten with the current date - for the entire dataset. This was due to the way that django handles bulk database writes.

The bulkloaddata command now transparently disables auto_now updates - for the duration of the import process only.

@SchrodingersGat SchrodingersGat added this to the 1.6.0 milestone Sep 21, 2026
@SchrodingersGat SchrodingersGat added bug Identifies a bug which needs to be addressed import / export Data importing, exporting and processing setup Relates to the InvenTree setup / installation process labels Sep 21, 2026
@netlify

netlify Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

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

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

@codecov

codecov Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.33%. Comparing base (bb195a7) to head (7bc5696).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12898      +/-   ##
==========================================
+ Coverage   87.32%   87.33%   +0.01%     
==========================================
  Files        1503     1503              
  Lines      102587   102653      +66     
  Branches    11595    11595              
==========================================
+ Hits        89584    89654      +70     
+ Misses      12938    12934       -4     
  Partials       65       65              
Flag Coverage Δ
backend 91.93% <100.00%> (+0.01%) ⬆️

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

Components Coverage Δ
Backend Apps 92.58% <ø> (ø)
Backend General 94.78% <ø> (ø)
Frontend 79.87% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat
SchrodingersGat merged commit 9469256 into inventree:master Sep 21, 2026
51 checks passed
@SchrodingersGat
SchrodingersGat deleted the bulk-import-fix branch September 21, 2026 03:05
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 import / export Data importing, exporting and processing setup Relates to the InvenTree setup / installation process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant