Opened 18 years ago

Closed 18 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: dev
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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@…> 18 years ago.
trivial patch to change kwargs to defaults in OneToOneField.formfield

Download all attachments as: .zip

Change History (3)

by Andrew Sutherland <andrew@…>, 18 years ago

trivial patch to change kwargs to defaults in OneToOneField.formfield

comment:1 by Gary Wilson <gary.wilson@…>, 18 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Jacob, 18 years ago

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