Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Feb 22, 2017
1 parent 29afb60 commit 0e65afe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion postgres_copy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def save(self, silent=False, stream=sys.stdout):

if not silent:
stream.write(
"%s records loaded\n" % intcomma(self.model.objects.count())
"%s records loaded\n" % intcomma(cursor.rowcount)
)

def get_headers(self):
Expand Down

2 comments on commit 0e65afe

@ckirby
Copy link
Contributor

@ckirby ckirby commented on 0e65afe Feb 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that work? I think the cursor rowcount will get reset by the drop_sql line. I assigned cursor.rowcount to an var after insert but before drop

@palewire
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. I see. My oversight.

Please sign in to comment.