﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3005	[patch] Manipulators and forms documentation uses do_html2python in the wrong place (new-admin changes)	msaelices@…	Adrian Holovaty	"Manipulators and forms docs fails in order of doing do_html2python. If validation fails, the new_data is not converted from html to python, and for example it causes this: When you send a form and validation fails, templates doesnt show old values in selects fields.

The problem is this code:

{{{

        # Check for validation errors
        errors = manipulator.get_validation_errors(new_data)
        if errors:
            return render_to_response('places/errors.html', {'errors': errors})
        else:
            manipulator.do_html2python(new_data)
            new_place = manipulator.save(new_data)
            return HttpResponse(""Place created: %s"" % new_place)

}}}

the correct code is this (changes order of do_html2python):

{{{
        # Check for validation errors
        errors = manipulator.get_validation_errors(new_data)
        manipulator.do_html2python(new_data)
        if errors:
            return render_to_response('places/errors.html', {'errors': errors})
        else:
            new_place = manipulator.save(new_data)
            return HttpResponse(""Place created: %s"" % new_place)
}}}

"	defect	closed	Documentation		major	fixed		gary.wilson@…	Ready for checkin	1	0	0	0	0	0
