-
-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make skip_history_when_saving
work when creating a new object
#1262
Make skip_history_when_saving
work when creating a new object
#1262
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1262 +/- ##
==========================================
+ Coverage 96.84% 96.87% +0.02%
==========================================
Files 24 23 -1
Lines 1457 1278 -179
Branches 240 211 -29
==========================================
- Hits 1411 1238 -173
+ Misses 25 21 -4
+ Partials 21 19 -2 ☔ View full report in Codecov by Sentry. |
bf22f55
to
54fcd0b
Compare
54fcd0b
to
a1f85a9
Compare
...a model object - not just when updating an object. Also improved the docs on saving without creating historical records, and fixed an unrelated `PollWithManyToMany` instance being used in the assertions in the existing test for `skip_history_when_saving`.
a1f85a9
to
3c2319c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you disagree with my review, I could be convinced to leave things as is.
Co-authored-by: Tim Schilling <schilling711@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Description
skip_history_when_saving
used to only apply when updating an existing object (due to thenot created
operand inpost_save()
), not when creating a new one. This PR fixes that.Also improved the docs on saving without creating historical records.
Related Issue
Closes #1141.
Motivation and Context
Fixing the linked issue.
How Has This Been Tested?
See the test added in
test_models.py
.Screenshots (if appropriate):
Types of changes
Checklist:
pre-commit run
command to format and lint.AUTHORS.rst
CHANGES.rst