don't force a redirect on POST of forms without a category

This commit is contained in:
Frédéric Péters 2015-03-08 21:05:53 +01:00
parent 6d7eac8ad8
commit 1dee6055cb
1 changed files with 4 additions and 1 deletions

View File

@ -851,9 +851,12 @@ class AlternateRootDirectory(OldRootDirectory):
except KeyError:
pass
else:
if formdef.category_id is None:
# if there's no category, or the request is a POST, directly call
# into FormsRootDirectory.
if formdef.category_id is None or get_request().get_method() == 'POST':
get_response().filter['bigdiv'] = 'rub_service'
return FormsRootDirectory()._q_lookup(component)
# if there is category, let it fall back to raise TraversalError,
# it will get caught in _q_traverse that will redirect it to an
# URL embedding the category