Ticket #11726: django-11726.diff

File django-11726.diff, 1.0 KB (added by esper256, 14 years ago)

Fix as described in the original comment

  • django/contrib/formtools/wizard.py

     
    6464        current_step = self.determine_step(request, *args, **kwargs)
    6565        self.parse_params(request, *args, **kwargs)
    6666
    67         # Sanity check.
    68         if current_step >= self.num_steps():
    69             raise Http404('Step %s does not exist' % current_step)
    70 
    7167        # For each previous step, verify the hash and process.
    7268        # TODO: Move "hash_%d" to a method to make it configurable.
    7369        for i in range(current_step):
     
    8379        else:
    8480            form = self.get_form(current_step)
    8581        if form.is_valid():
     82            # Sanity check.
     83            if current_step >= self.num_steps():
     84                raise Http404('Step %s does not exist' % current_step)
     85
    8686            self.process_step(request, form, current_step)
    8787            next_step = current_step + 1
    8888
Back to Top