Opened 18 years ago

Closed 17 years ago

#4167 closed (fixed)

[0.91-bugfixes][patch] FormFields have list-mutability issues with validator_list argument

Reported by: Tom Tobin <korpios@… Owned by: James Bennett
Component: Core (Other) Version: 0.91
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In 0.91-bugfixes, FormFields have list-mutability issues with the validator_list argument in their __init__ methods; since validator_list has a default of [], that very same list is mutated and re-used in future calls with a default value for validator_list. By setting the default value to None and replacing None with [] in the method body, we avoid this issue.

Attachments (1)

django-0.91-formfield-list-mutability-fix.patch (12.6 KB ) - added by Tom Tobin <korpios@…> 18 years ago.
FormField list-mutability fix for 0.91-bugfixes

Download all attachments as: .zip

Change History (3)

by Tom Tobin <korpios@…>, 18 years ago

FormField list-mutability fix for 0.91-bugfixes

comment:1 by anonymous, 18 years ago

Owner: changed from Adrian Holovaty to James Bennett

comment:2 by James Bennett, 17 years ago

Resolution: fixed
Status: newclosed

Fixed in [5507].

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