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
Return insert_count on .save() #67
Conversation
Return insert_count on .save()
Travis error is: |
I'm alright with this change, I think. Though should we be trying to mirror the dictionary now returned by some Django insert and delete commands? Or am I overthinking it? |
Seems unnecessary; you mean something like .delete(): |
Alright. We can skip it. One thing I would like yet is a unittest that would verify the number is being returned and is accurate. |
Compress setup_query() selection clause
@@ -24,10 +24,11 @@ def setup_query(self): | |||
for field in self.query.copy_to_fields: | |||
# raises error if field is not available | |||
expression = self.query.resolve_ref(field) | |||
if field in self.query.annotations: |
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.
This change seems like a good one, but unrelated to insert_count. Is that right, or am I missing something?
@@ -101,6 +101,8 @@ def save(self, silent=False, stream=sys.stdout): | |||
"%s records loaded\n" % intcomma(insert_count) | |||
) | |||
|
|||
return insert_count |
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.
I'd like a unit test yet that verifies this number is returned, and that it is accurate.
I've made some changes and merged. |
No description provided.