mirror of
https://github.com/django/django.git
synced 2025-10-05 00:00:37 +00:00
Merge branch 'master' into schema-alteration
This commit is contained in:
commit
b31eea069c
162 changed files with 2460 additions and 1346 deletions
|
@ -349,7 +349,7 @@ class Options(object):
|
|||
"""
|
||||
Returns the requested field by name. Raises FieldDoesNotExist on error.
|
||||
"""
|
||||
to_search = many_to_many and (self.fields + self.many_to_many) or self.fields
|
||||
to_search = (self.fields + self.many_to_many) if many_to_many else self.fields
|
||||
for f in to_search:
|
||||
if f.name == name:
|
||||
return f
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue