diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-12-09 15:32:09 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-12-09 15:45:53 +0100 |
| commit | d6505273cd889886caca57884fa79941b18c2ea6 (patch) | |
| tree | 3b61de44e01283a32891afe7a8407828d2f47e97 /django | |
| parent | 4540842bc385a60cf32970a8b372b80d47704bca (diff) | |
Refs #31044 -- Fixed error message when using Prefetch with a values_list() queryset.
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/query.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py index 764d3ea289..38c13584d1 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -1541,7 +1541,8 @@ class Prefetch: ) ): raise ValueError( - 'Prefetch querysets cannot use raw() and values().' + 'Prefetch querysets cannot use raw(), values(), and ' + 'values_list().' ) if to_attr: self.prefetch_to = LOOKUP_SEP.join(lookup.split(LOOKUP_SEP)[:-1] + [to_attr]) |
