diff options
author | Étienne Beaulé <beauleetienne0@gmail.com> | 2020-10-19 17:10:06 -0400 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-10-21 20:54:53 +0200 |
commit | 509d9da26fb92a8d566ec105ff40bb024803ceaa (patch) | |
tree | 0f3138173705775a0db082ee0df8101beda178bf /django/db/models/functions/math.py | |
parent | 257f8495d6c93e30ab0f52af4c488d7344bcf112 (diff) | |
download | django-509d9da26fb92a8d566ec105ff40bb024803ceaa.tar.gz |
Fixed #26390 -- Disabled grouping by Random().
Thanks to Tzu-ping Chung for the tests.
Diffstat (limited to 'django/db/models/functions/math.py')
-rw-r--r-- | django/db/models/functions/math.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/db/models/functions/math.py b/django/db/models/functions/math.py index 304e112225..15915f4b7c 100644 --- a/django/db/models/functions/math.py +++ b/django/db/models/functions/math.py @@ -154,6 +154,9 @@ class Random(NumericOutputFieldMixin, Func): def as_sqlite(self, compiler, connection, **extra_context): return super().as_sql(compiler, connection, function='RAND', **extra_context) + def get_group_by_cols(self, alias=None): + return [] + class Round(Transform): function = 'ROUND' |