Opened 10 years ago

Closed 10 years ago

#3581 closed (fixed)

related.py's OneToOneField.formfield erroneously uses kwargs instead of defaults

Reported by: Andrew Sutherland <andrew@…> Owned by: Adrian Holovaty
Component: Forms Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

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.

Attachments (1)

related-onetoone-kwargs-to-defaults.patch (658 bytes) - added by Andrew Sutherland <andrew@…> 10 years ago.
trivial patch to change kwargs to defaults in OneToOneField.formfield

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by Andrew Sutherland <andrew@…>

trivial patch to change kwargs to defaults in OneToOneField.formfield

comment:1 Changed 10 years ago by Gary Wilson <gary.wilson@…>

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedReady for checkin

comment:2 Changed 10 years ago by Jacob

Resolution: fixed
Status: newclosed

(In [4611]) Fixed #3581, a small typo in OneToOneField.formfield(). Thanks, Andrew Sutherland.

Note: See TracTickets for help on using tickets.
Back to Top