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 <s...@apache.org>
AuthorDate: Fri Dec 15 13:53:39 2017 +0000

    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" <commits@whimsical.apache.org>'].

Reply via email to