Opened 8 years ago

Closed 8 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: ubernostrum
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: UI/UX:

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@…> 8 years ago.
FormField list-mutability fix for 0.91-bugfixes

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by Tom Tobin <korpios@…>

FormField list-mutability fix for 0.91-bugfixes

comment:1 Changed 8 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from adrian to ubernostrum
  • Patch needs improvement unset

comment:2 Changed 8 years ago by ubernostrum

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [5507].

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