related.py's OneToOneField.formfield erroneously uses kwargs instead of defaults
|Reported by:||Owned by:||Adrian Holovaty|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
In related.py, OneToOneField.formfield takes kwargs, initializes the defaults dict, updates the defaults dict with the contents of kwargs, then just passes kwargs to ModelChoiceField, never doing anything with defaults again. The other similar methods in the file use defaults, I assume this was a typo.
Attaching the trivial patch, and setting to django.newforms since that's where #3257 which touched this was binned.
Change History (3)
comment:1 Changed 10 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Ready for checkin|