whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: person.attrs['givenName'] may be missing
Date Sat, 28 Jul 2018 19:38:08 GMT
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 <sebb@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
 


Mime
View raw message