Skip to content

Commit

Permalink
Some docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Dec 2, 2017
1 parent 56e2c6a commit baea675
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions postgres_copy/__init__.py
Expand Up @@ -23,8 +23,10 @@ def to_csv(self, csv_path, *fields, **kwargs):
Copy current QuerySet to CSV at provided path.
"""
try:
# For Django 2.0 forward
query = self.query.chain(CopyToQuery)
except AttributeError:
# For Django 1.11 backward
query = self.query.clone(CopyToQuery)

# Get fields
Expand Down

0 comments on commit baea675

Please sign in to comment.