You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2017/12/14 13:38:18 UTC

[whimsy] branch master updated: Allow for missing person

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