Skip to content

Commit

Permalink
Avoid raising Redirect to avoid aborting the transaction.
Browse files Browse the repository at this point in the history
This reverts further parts of c424137.
  • Loading branch information
hannosch committed Sep 14, 2017
1 parent 05ec0d6 commit 993da0d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/App/FactoryDispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ def __getattr__(self, name):
def manage_main(trueself, self, REQUEST, update_menu=0):
"""Implement a contents view by redirecting to the true view
"""
raise Redirect(self.DestinationURL() + '/manage_main')
REQUEST.RESPONSE.redirect(self.DestinationURL() + '/manage_main')


InitializeClass(FactoryDispatcher)
2 changes: 1 addition & 1 deletion src/App/Management.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def manage_workspace(self, REQUEST):
'You are not authorized to view this object.')

if m.find('/'):
raise Redirect("%s/%s" % (REQUEST['URL1'], m))
return REQUEST.RESPONSE.redirect("%s/%s" % (REQUEST['URL1'], m))

return getattr(self, m)(self, REQUEST)

Expand Down
4 changes: 2 additions & 2 deletions src/OFS/PropertySheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,9 @@ def _propdict(self):
manage = DTMLFile('dtml/properties', globals())

security.declareProtected(manage_properties, 'manage_propertiesForm')
def manage_propertiesForm(self, URL1):
def manage_propertiesForm(self, URL1, RESPONSE):
" "
raise Redirect(URL1 + '/manage')
RESPONSE.redirect(URL1 + '/manage')

security.declareProtected(manage_properties, 'manage_addProperty')
def manage_addProperty(self, id, value, type, REQUEST=None):
Expand Down

0 comments on commit 993da0d

Please sign in to comment.