This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 4d3d651  WHIMSY-343 - incorrect completion if mail fails
4d3d651 is described below

commit 4d3d6511722a3dd92a0ef2fd31ea16df2fe8ecd8
Author: Sebb <[email protected]>
AuthorDate: Fri Sep 25 23:27:20 2020 +0100

    WHIMSY-343 - incorrect completion if mail fails
---
 www/secretary/workbench/views/actions/pubkey.json.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/secretary/workbench/views/actions/pubkey.json.rb 
b/www/secretary/workbench/views/actions/pubkey.json.rb
index 391b87a..9312bb3 100644
--- a/www/secretary/workbench/views/actions/pubkey.json.rb
+++ b/www/secretary/workbench/views/actions/pubkey.json.rb
@@ -32,9 +32,10 @@ task "email #{message.from}" do
 
   # deliver mail
   complete do
+    _disposition :keep # set this first in case mail sending fails
+
     mail.deliver!
 
     _status 'request to upload public key has been sent.'
-    _disposition :keep
   end
 end

Reply via email to