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 2019/03/22 19:41:12 UTC

[whimsy] branch master updated: Hack to allow editting of multiple entries

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 <se...@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