Skip to content

Commit 39d4d4c

Browse files
authored
Merge pull request #167 from bbajuzik/160-django-4.2-compatibility
Django 4.2+ compatible setup_query
2 parents 66aaac0 + c953a5d commit 39d4d4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

postgres_copy/copy_to.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ class SQLCopyToCompiler(SQLCompiler):
1717
"""
1818
Custom SQL compiler for creating a COPY TO query (postgres backend only).
1919
"""
20-
def setup_query(self):
20+
def setup_query(self, **kwargs):
2121
"""
2222
Extend the default SQLCompiler.setup_query to add re-ordering of items in select.
2323
"""
24-
super(SQLCopyToCompiler, self).setup_query()
24+
super(SQLCopyToCompiler, self).setup_query(**kwargs)
2525
if self.query.copy_to_fields:
2626
self.select = []
2727
for field in self.query.copy_to_fields:

0 commit comments

Comments
 (0)