[whimsy] branch master updated: check for empty list just in case

2017-12-15 Thread sebb
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 5e99628  check for empty list just in case
5e99628 is described below

commit 5e99628962852cab88283849d0a06c44f29e4bfa
Author: Sebb 
AuthorDate: Fri Dec 15 13:53:39 2017 +

check for empty list just in case
---
 www/roster/views/actions/committee.json.rb | 3 +++
 www/roster/views/actions/ppmc.json.rb  | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/www/roster/views/actions/committee.json.rb 
b/www/roster/views/actions/committee.json.rb
index e2b6664..f93ff3e 100644
--- a/www/roster/views/actions/committee.json.rb
+++ b/www/roster/views/actions/committee.json.rb
@@ -10,6 +10,9 @@ if env.password
 raise ArgumentError.new("ids=#{@ids}") if people.any? {|person| 
person.nil?}
   end
 
+  # Don't allow empty list
+  raise ArgumentError.new("ids='#{@ids}'") unless people.length > 0
+
   raise ArgumentError.new("project=#{@project}") unless pmc
 
   # update LDAP
diff --git a/www/roster/views/actions/ppmc.json.rb 
b/www/roster/views/actions/ppmc.json.rb
index fb476e5..b7ba05e 100644
--- a/www/roster/views/actions/ppmc.json.rb
+++ b/www/roster/views/actions/ppmc.json.rb
@@ -8,6 +8,9 @@ if env.password
 raise ArgumentError.new("ids=#{@ids}") if people.any? {|person| 
person.nil?}
   end
 
+  # Don't allow empty list
+  raise ArgumentError.new("ids='#{@ids}'") unless people.length > 0
+
   # if target is ONLY icommit, use incubator in the email message, etc.
   # Otherwise, use the project (podling).
   if @targets == ['icommit']

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" '].


[whimsy] branch master updated: check for empty

2016-09-19 Thread rubys
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
   new  e8443d3   check for empty
e8443d3 is described below

commit e8443d3f3a1fa8f5ae26ab9c4d901e52697a01dd
Author: Sam Ruby 
AuthorDate: Mon Sep 19 14:49:26 2016 -0400

check for empty
---
 www/secmail/views/actions/icla.json.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/secmail/views/actions/icla.json.rb 
b/www/secmail/views/actions/icla.json.rb
index e5c643a..3a9c4bf 100644
--- a/www/secmail/views/actions/icla.json.rb
+++ b/www/secmail/views/actions/icla.json.rb
@@ -112,9 +112,9 @@ end
 # send confirmation email
 task "email #@email" do
   # chose reply based on whether or not the project/userid info was provided
-  if @user
+  if @user and not @user.empty?
 reply = 'icla-account-requested.erb'
-  elsif @product
+  elsif @product and not @project.empty?
 reply = 'icla-pmc-notified.erb'
   else
 reply = 'icla.erb'

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" '].