From 2162f0983de0dfe2178531638ce7ea56f54dd4e7 Mon Sep 17 00:00:00 2001 From: Matthew Wilkes Date: Sun, 18 Jun 2017 16:53:40 +0100 Subject: Fixed #24747 -- Allowed transforms in QuerySet.order_by() and distinct(*fields). --- django/db/backends/base/operations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'django/db/backends/base') diff --git a/django/db/backends/base/operations.py b/django/db/backends/base/operations.py index f6d8925278..465ac70b7b 100644 --- a/django/db/backends/base/operations.py +++ b/django/db/backends/base/operations.py @@ -158,7 +158,7 @@ class BaseDatabaseOperations: """ return '' - def distinct_sql(self, fields): + def distinct_sql(self, fields, params): """ Return an SQL DISTINCT clause which removes duplicate rows from the result set. If any fields are given, only check the given fields for @@ -167,7 +167,7 @@ class BaseDatabaseOperations: if fields: raise NotSupportedError('DISTINCT ON fields is not supported by this database backend') else: - return 'DISTINCT' + return ['DISTINCT'], [] def fetch_returned_insert_id(self, cursor): """ -- cgit v1.3