Skip to content

Fix database routing bug on save()#866

Merged
bckohan merged 5 commits intojazzband:masterfrom
bckohan:master
Feb 20, 2026
Merged

Fix database routing bug on save()#866
bckohan merged 5 commits intojazzband:masterfrom
bckohan:master

Conversation

@bckohan
Copy link
Collaborator

@bckohan bckohan commented Feb 20, 2026

Closes #865

This bug is a regression introduced in 4.11 when the PolymorphicModel.save() arguments were typed.

Prior to 4.11 the code passed the arguments through using **kwargs. The regression was caused by using being set to if it was none - but the router was not consulted first.

@bckohan bckohan merged commit 6b41389 into jazzband:master Feb 20, 2026
35 checks passed
@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.24%. Comparing base (28994d3) to head (03314a4).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #866      +/-   ##
==========================================
- Coverage   91.25%   91.24%   -0.01%     
==========================================
  Files          28       28              
  Lines        1899     1897       -2     
  Branches      274      273       -1     
==========================================
- Hits         1733     1731       -2     
  Misses        110      110              
  Partials       56       56              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release 4.11 causes UPDATE query to be routed to reader DB

1 participant