You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by cl...@apache.org on 2020/07/08 22:23:33 UTC

[whimsy] branch roster-emeritus updated: Defer checking return from create

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

clr pushed a commit to branch roster-emeritus
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/roster-emeritus by this push:
     new 19c7b49  Defer checking return from create
19c7b49 is described below

commit 19c7b491b54be0418ccfa37c0ee05749cf3312be
Author: Craig L Russell <ap...@gmail.com>
AuthorDate: Wed Jul 8 15:23:07 2020 -0700

    Defer checking return from create
---
 www/roster/views/actions/memstat.json.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/www/roster/views/actions/memstat.json.rb b/www/roster/views/actions/memstat.json.rb
index 25fb878..d383584 100644
--- a/www/roster/views/actions/memstat.json.rb
+++ b/www/roster/views/actions/memstat.json.rb
@@ -82,10 +82,8 @@ elsif @action == 'request_emeritus'
     .gsub('Date: _________________________________',
           ('Date: _______' + centered_date))
   # Write the emeritus request to emeritus-requests-received
-  EMERITUS_REQUEST_URL = ASF::SVN.svnpath('emeritus-requests-received').untaint
+  EMERITUS_REQUEST_URL = ASF::SVN.svnpath!('emeritus-requests-received').untaint
   rc = ASF::SVN.create_(EMERITUS_REQUEST_URL, "#{USERID}.txt", signed_request, "Emeritus request from #{USERNAME}  (#{USERID}", env, _)
-  if rc == 1 break # do nothing if there is already an emeritus request
-
   ASF::Mail.configure
   mail = Mail.new do
     from "secretary@apache.org"
@@ -96,7 +94,9 @@ elsif @action == 'request_emeritus'
     end
   end
   mail.attachments["#{USERID}.txt"] = signed_request.untaint
-  mail.deliver!
+  if rc == 0
+    mail.deliver!
+  end
 elsif @action == 'request_reinstatement'
   ASF::Mail.configure
   mail = Mail.new do