#10810: FormWizard validates the last form twice
-----------------------------------+------------------------------------
Reporter: Qrilka | Owner: nobody
Type: Bug | Status: new
Component: contrib.formtools | Version: master
Severity: Normal | Resolution:
Keywords: wizard validation | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Comment (by lucalenardi):
I'm experiencing the same issue, involving a re-captcha field validated
'''more than once'''. Using Django 1.6.5.
I agree with steph that hacking around the last step isn't a good idea and
it should be something related to any single step or even to specific
fields (mark a step or a field to not being re-validated).
I would also like to note that the {{{form}}} parameter passed to
{{{render_done()}}} is actually the last step '''already validated''', so
as a temporary fix it should be possible to skip the test and store
{{{form}}} in the {{{final_form}}} dictionary as is. But, is this the
expected behaviour?
{{{
if form_key != self.steps.last and not form_obj.is_valid():
return self.render_revalidation_failure(form_key,
form_obj, **kwargs)
elif form_key == self.steps.last:
# the passed form object, is the last step of the wizard
# and at this point has been already validated.
form_obj = form
final_forms[form_key] = form_obj
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/10810#comment:14>
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.2289c9382732ecc375128dcf2a41a6c7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.