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: Hack to allow editting of multiple entries
Date Fri, 22 Mar 2019 19:41:12 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 8bc575e  Hack to allow editting of multiple entries
8bc575e is described below

commit 8bc575ec106dc69b6f931683e9ba1cd1b2a68fa9
Author: Sebb <sebb@apache.org>
AuthorDate: Fri Mar 22 19:41:08 2019 +0000

    Hack to allow editting of multiple entries
---
 www/roster/views/actions/github.json.rb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/www/roster/views/actions/github.json.rb b/www/roster/views/actions/github.json.rb
index 559d962..17ca4f5 100644
--- a/www/roster/views/actions/github.json.rb
+++ b/www/roster/views/actions/github.json.rb
@@ -10,7 +10,11 @@ _ldap.update do
   _previous githubUsername: person.attrs['githubUsername']
 
   if @githubuser and not @dryrun
-    person.modify 'githubUsername', @githubuser
+    # TODO: Hack to deal with single input field on the form
+    # multiple entries are currently displayed with commas when editting
+    names = @githubuser.split(/[, ]+/)
+    Wunderbar.warn(names.inspect)
+    person.modify 'githubUsername', names 
   end
 end
 


Mime
View raw message