#19643: TypedChoiceField and TypedMultipleChoiceField call the super validate()
method instead of their own
-------------------------------------+-------------------------------------
     Reporter:  BerislavLopac        |                    Owner:
         Type:  Bug                  |  BerislavLopac
    Component:  Forms                |                   Status:  assigned
     Severity:  Normal               |                  Version:  master
     Keywords:  MultipleChoiceField  |               Resolution:
  TypedMultipleChoiceField           |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  1                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by lucasicf):

 This ticket is inactive for 5 weeks, can I help here?

 It took me a lot of time to figure out what was the actual problem.
 I thought the solution was to call self.validate() instead of
 super().validate() inside to_python().
 However, by reading the sent patch, I noticed that the solution is not to
 call any validate() at all, since this is not done by any other field
 class.
 If I'm right, the failing test I wrote covers this problem. The test is
 failing in the master, but working after applying the patch sent by
 BerislavLopac.

 Here is the test patch:
 
https://github.com/lucasicf/django/commit/165fdb931a86566bdb2f3439144cc15b1ed92bc3

 I also regenerated the BerislavLopac's patch in the current master, since
 it got outdated in 5 weeks:
 
https://github.com/lucasicf/django/commit/ce40022288114b66aa0fd9b5a63ecd2c89972ab3

 Hope I could help, I'm a new contributor in django.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19643#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to