mirror of
https://github.com/django/django.git
synced 2025-11-30 07:19:08 +00:00
Made FieldError/FieldDoesNotExist messages uniform across Python versions.
Removed possible u'' prefixes on Python 2.
This commit is contained in:
parent
9027e6c8a3
commit
631ef6b272
5 changed files with 9 additions and 11 deletions
|
|
@ -1339,7 +1339,7 @@ class Query(object):
|
|||
if pos == -1 or fail_on_missing:
|
||||
field_names = list(get_field_names_from_opts(opts))
|
||||
available = sorted(field_names + list(self.annotation_select))
|
||||
raise FieldError("Cannot resolve keyword %r into field. "
|
||||
raise FieldError("Cannot resolve keyword '%s' into field. "
|
||||
"Choices are: %s" % (name, ", ".join(available)))
|
||||
break
|
||||
# Check if we need any joins for concrete inheritance cases (the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue