mirror of
https://github.com/django/django.git
synced 2025-12-03 08:32:59 +00:00
parent
9108696a75
commit
b679a3cdb1
2 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue