Commit 39c0c077 by Carmen Wick

Use cleaned_content instead of raw_content when generating a form instance for…

Use cleaned_content instead of raw_content when generating a form instance for the DocumentingTemplateEmitter. This allows the form to be prepopulated with the resource's existing values.
parent 23d924eb
...@@ -227,7 +227,7 @@ class DocumentingTemplateEmitter(BaseEmitter): ...@@ -227,7 +227,7 @@ class DocumentingTemplateEmitter(BaseEmitter):
# Otherwise if we have a response that is valid against the form then use that # Otherwise if we have a response that is valid against the form then use that
if not form_instance and resource.response.has_content_body: if not form_instance and resource.response.has_content_body:
try: try:
form_instance = resource.get_bound_form(resource.response.raw_content) form_instance = resource.get_bound_form(resource.response.cleaned_content)
if form_instance and not form_instance.is_valid(): if form_instance and not form_instance.is_valid():
form_instance = None form_instance = None
except: except:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment