chore: Update django api

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2709>
environments/review-docs-v2-ov-8q6uyo/deployments/19325
Georg Krause 2024-01-30 14:44:23 +01:00 zatwierdzone przez Marge
rodzic f1f6ef43ad
commit 803b077f00
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -60,12 +60,12 @@ class NullsLastSQLCompiler(SQLCompiler):
class NullsLastQuery(models.sql.query.Query):
"""Use a custom compiler to inject 'NULLS LAST' (for PostgreSQL)."""
def get_compiler(self, using=None, connection=None):
def get_compiler(self, using=None, connection=None, elide_empty=True):
if using is None and connection is None:
raise ValueError("Need either using or connection")
if using:
connection = connections[using]
return NullsLastSQLCompiler(self, connection, using)
return NullsLastSQLCompiler(self, connection, using, elide_empty)
class NullsLastQuerySet(models.QuerySet):