-
-
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
Don't populate excluded fields in populate history #410
Don't populate excluded fields in populate history #410
Conversation
- tests the management command on an historical record which has excluded fields - tests the excluded fields are retrieved from the current model instance
Previously, it was pre-loading directly related objects.
Codecov Report
@@ Coverage Diff @@
## master #410 +/- ##
==========================================
+ Coverage 97.14% 97.16% +0.02%
==========================================
Files 14 14
Lines 630 635 +5
Branches 87 89 +2
==========================================
+ Hits 612 617 +5
Misses 9 9
Partials 9 9
Continue to review full report at Codecov.
|
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.
Looks about right
with self.assertRaises(AttributeError): | ||
historical.place | ||
|
||
def test_nb_queries(self): |
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.
Why do you want to test the number of DB queries?
Description
Rebases #381 in order to get it merged for 2.1.1 release. Fixes error when trying to bulk_create history with excluded fields that occurs when running
populate_history
management command. Closes #402. Thanks @uadnan for this fix.Related Issue
#402
Types of changes
Checklist: