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 2018/07/28 19:38:08 UTC

[whimsy] branch master updated: person.attrs['givenName'] may be missing

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 35e3412  person.attrs['givenName'] may be missing
35e3412 is described below

commit 35e341235a8fed668d7689642cfebf9bc691708d
Author: Sebb <se...@apache.org>
AuthorDate: Sat Jul 28 20:38:07 2018 +0100

    person.attrs['givenName'] may be missing
---
 www/roster/views/actions/fullname.json.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/roster/views/actions/fullname.json.rb b/www/roster/views/actions/fullname.json.rb
index b3e6c28..84f7d2e 100644
--- a/www/roster/views/actions/fullname.json.rb
+++ b/www/roster/views/actions/fullname.json.rb
@@ -16,7 +16,8 @@ if @commonname and person.attrs['cn'].first != @commonname
   mods['cn'] = @commonname
 end
 
-if @givenname and person.attrs['givenName'].first != @givenname
+# person.attrs['givenName'] may be missing
+if @givenname and (not person.attrs['givenName'] or person.attrs['givenName'].first != @givenname)
   mods['givenName'] = @givenname
 end