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 907d8ac  Allow for missing person
907d8ac is described below

commit 907d8acdd40c8551a92854cb1af121681e4150a4
Author: Sebb <[email protected]>
AuthorDate: Thu Dec 14 13:38:07 2017 +0000

    Allow for missing person
---
 www/roster/views/actions/ppmc.json.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/roster/views/actions/ppmc.json.rb 
b/www/roster/views/actions/ppmc.json.rb
index 5c04c94..149e9d4 100644
--- a/www/roster/views/actions/ppmc.json.rb
+++ b/www/roster/views/actions/ppmc.json.rb
@@ -72,7 +72,8 @@ if env.password
 
   # extract people's names (for short lists) or ids (for longer lists)
   if people.length <= 2
-    who = people.map {|person| person.public_name}.join(' and ')
+    # Person may not exist when ids are renamed
+    who = people.map {|person| (person.public_name rescue person.id)}.join(' 
and ')
   else
     who = people[0..-2].map {|person| person.id}.join(', ') + 
       ', and ' + people.last.id

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to