Skip to content

Commit

Permalink
Merge branch '160-django-4.2-compatibility' of https://github.com/bba…
Browse files Browse the repository at this point in the history
…juzik/django-postgres-copy into bbajuzik-160-django-4.2-compatibility
  • Loading branch information
palewire committed Jun 15, 2023
2 parents 66aaac0 + c953a5d commit 2708ffc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postgres_copy/copy_to.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class SQLCopyToCompiler(SQLCompiler):
"""
Custom SQL compiler for creating a COPY TO query (postgres backend only).
"""
def setup_query(self):
def setup_query(self, **kwargs):
"""
Extend the default SQLCompiler.setup_query to add re-ordering of items in select.
"""
super(SQLCopyToCompiler, self).setup_query()
super(SQLCopyToCompiler, self).setup_query(**kwargs)
if self.query.copy_to_fields:
self.select = []
for field in self.query.copy_to_fields:
Expand Down

0 comments on commit 2708ffc

Please sign in to comment.