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 64ea5b7 Don't bind to LDAP for a dry-run (or no data)
64ea5b7 is described below
commit 64ea5b754835ea731f2966f0d5ba9b5aedca29d9
Author: Sebb <[email protected]>
AuthorDate: Sat Mar 23 10:24:43 2019 +0000
Don't bind to LDAP for a dry-run (or no data)
---
www/roster/views/actions/sascore.json.rb | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/www/roster/views/actions/sascore.json.rb
b/www/roster/views/actions/sascore.json.rb
index afee769..62ba2d1 100644
--- a/www/roster/views/actions/sascore.json.rb
+++ b/www/roster/views/actions/sascore.json.rb
@@ -2,14 +2,14 @@
# Update LDAP SpamAssassin score attribute for a committer
#
-# update LDAP
-_ldap.update do
- person = ASF::Person.find(@userid)
+person = ASF::Person.find(@userid)
- # report the previous value in the response
- _previous sascore: person.attrs['asf-sascore']
+# report the previous value in the response
+_previous sascore: person.attrs['asf-sascore']
- if @sascore and not @dryrun
+if @sascore and not @dryrun
+ # update LDAP
+ _ldap.update do
person.modify 'asf-sascore', @sascore
end
end