Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #3581, a small typo in OneToOneField.formfield(). Thanks, Andre…

…w Sutherland.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4611 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 9da791aa6b31d0eee1c24e53aa5daa9150189004 1 parent 51f39d5
@jacobian jacobian authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/db/models/fields/related.py
View
2  django/db/models/fields/related.py
@@ -621,7 +621,7 @@ def contribute_to_related_class(self, cls, related):
def formfield(self, **kwargs):
defaults = {'queryset': self.rel.to._default_manager.all(), 'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text}
defaults.update(kwargs)
- return forms.ModelChoiceField(**kwargs)
+ return forms.ModelChoiceField(**defaults)
class ManyToManyField(RelatedField, Field):
def __init__(self, to, **kwargs):
Please sign in to comment.
Something went wrong with that request. Please try again.