mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Fixed #23443 -- Corrected erroneous FieldError message.
Thanks Tim Graham for the review.
This commit is contained in:
parent
abc11b0a33
commit
e008a10c2f
2 changed files with 16 additions and 8 deletions
|
|
@ -2164,6 +2164,13 @@ class ValuesQuerysetTests(BaseQuerysetTest):
|
|||
qs = qs.values_list('num', flat=True)
|
||||
self.assertQuerysetEqual(qs, [72], self.identity)
|
||||
|
||||
def test_field_error_values_list(self):
|
||||
# see #23443
|
||||
with self.assertRaisesMessage(FieldError,
|
||||
"Cannot resolve keyword %r into field."
|
||||
" Join on 'name' not permitted." % 'foo'):
|
||||
Tag.objects.values_list('name__foo')
|
||||
|
||||
|
||||
class QuerySetSupportsPythonIdioms(TestCase):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue