# HG changeset patch # User Paul Boddie # Date 1342386187 -7200 # Node ID d8963d3fc22f48815d52371a5d90d5b2019cc319 # Parent ceab20195fe53e6eee1ac1c58590ba475ccae351 Handle an empty mimetype from the form. Set the page on the HTML formatter in order to avoid later failure. diff -r ceab20195fe5 -r d8963d3fc22f actions/SharedUpdate.py --- a/actions/SharedUpdate.py Sun Jul 15 22:10:20 2012 +0200 +++ b/actions/SharedUpdate.py Sun Jul 15 23:03:07 2012 +0200 @@ -135,7 +135,7 @@ # Perform content negotiation if no mimetype was specified. - if mimetype is None: + if not mimetype: mimetypes = getPreferredOutputTypes(request, mimetypes) if mimetypes: mimetype = mimetypes[0] @@ -161,6 +161,7 @@ parser.formatForOutputType(mimetype) else: fmt = request.html_formatter + fmt.setPage(page) parser.format(fmt) return