Skip to content

Commit

Permalink
fixed duplicate execution of meta-cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
zmsdev committed Sep 25, 2023
1 parent b6cfc37 commit 33652e4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Products/zms/zmsobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -1241,8 +1241,8 @@ def manage_executeMetacmd(self, lang, REQUEST, RESPONSE=None):
if metaCmd is not None:
# Execute directly.
ob = zopeutil.getObject(self, id)
value = zopeutil.callObject(ob, zmscontext=self)
if not metaCmd['id'].startswith('manage_tab_') and metaCmd.get('execution', 0) == 1:
value = zopeutil.callObject(ob, zmscontext=self)
if isinstance(value, str):
message = value
elif isinstance(value, tuple):
Expand All @@ -1256,8 +1256,7 @@ def manage_executeMetacmd(self, lang, REQUEST, RESPONSE=None):
status = 201 # Turbolinks
RESPONSE.setHeader('Location',loc)
RESPONSE.setHeader('Turbolinks-Location',loc)
RESPONSE.redirect(loc,status=status)
return value
return RESPONSE.redirect(loc,status=status)

# Return with message.
message = standard.url_quote(message)
Expand Down

0 comments on commit 33652e4

Please sign in to comment.