Hi,
I have a form wizard view with 2 required forms & 1 optional form in it. I'm seeing an occasional error during submission. Here's my named forms:
DONATE_FORMS = [("donate", DonateFormItemInformation), ("delivery", DonateFormDeliveryMethod), ("about", DonateFormAbout)]
My URL entry:
login_required(DonateWizard.as_view(DONATE_FORMS, condition_dict=DONATE_CONDITION_DICT)),
My condition dictionary:
DONATE_CONDITION_DICT = {'about': show_donor_about_form}
Finally the condition itself:
def show_donor_about_form(wizard):
return wizard.request.user.is_authenticated() and not wizard.request.user.has_donor_profile()
The error I'm getting is:
ValueError: u'about' is not in list
The odd part is that the in the logs for this error, I'm seeing the form data for 'about'. So the user is getting to the form, entering data, & submitting it, then the error occurs. I can't reproduce this reliably. After digging into the django source, looks like the get_form_list method regenerates the form_list every step. So could the condition return true before the form is display, then suddenly return false after the form submission?
Any help is appreciated.