Skip to content

Commit

Permalink
#160 Django 4.2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
BranislavBajuzik committed Jun 12, 2023
1 parent 6fc4d6c commit c953a5d
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 c953a5d

Please sign in to comment.