Commit ce8e9131 authored by Aurel's avatar Aurel

erp5_forge: use Base_redirect when spreadsheet is invalid

parent b0c0279b
...@@ -22,9 +22,8 @@ def invalid_category_spreadsheet_handler(message): ...@@ -22,9 +22,8 @@ def invalid_category_spreadsheet_handler(message):
# action taken when an invalid spreadsheet is provided. # action taken when an invalid spreadsheet is provided.
# we *raise* a Redirect, because we don't want the transaction to succeed # we *raise* a Redirect, because we don't want the transaction to succeed
# note, we could make a dialog parameter to allow import invalid spreadsheet: # note, we could make a dialog parameter to allow import invalid spreadsheet:
raise ValueError('Redirect', '%s/view?portal_status_message=%s' % ( context.Base_redirect('view', keep_items={'portal_status_message':message),
context.portal_categories.absolute_url(), abort_transaction=True)
message))
category_list_mapping = context.Base_getCategoriesSpreadSheetMapping(import_file, category_list_mapping = context.Base_getCategoriesSpreadSheetMapping(import_file,
invalid_spreadsheet_error_handler=invalid_category_spreadsheet_handler) invalid_spreadsheet_error_handler=invalid_category_spreadsheet_handler)
......
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