From 9da791aa6b31d0eee1c24e53aa5daa9150189004 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Mon, 26 Feb 2007 17:38:55 +0000 Subject: [PATCH] Fixed #3581, a small typo in OneToOneField.formfield(). Thanks, Andrew Sutherland. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4611 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/fields/related.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py index 3e8f9adbd8..fad9c164c1 100644 --- a/django/db/models/fields/related.py +++ b/django/db/models/fields/related.py @@ -621,7 +621,7 @@ class OneToOneField(RelatedField, IntegerField): 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):