1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +00:00

Tested QuerySet compatibility check.

cdfdcf4b70 missed this test.
This commit is contained in:
Tim Graham
2016-10-14 08:48:50 -04:00
parent 9108696a75
commit b679a3cdb1
2 changed files with 6 additions and 1 deletions

View File

@@ -1059,7 +1059,7 @@ class Query(object):
if not value.is_compatible_query_object_type(opts, field):
raise ValueError(
'Cannot use QuerySet for "%s": Use a QuerySet for "%s".' %
(value.model._meta.model_name, opts.object_name)
(value.model._meta.object_name, opts.object_name)
)
elif hasattr(value, '_meta'):
self.check_query_object_type(value, opts, field)