You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by cu...@apache.org on 2020/02/06 21:06:25 UTC
[whimsy] branch master updated: Fix for statistics of newly elected
members
This is an automated email from the ASF dual-hosted git repository.
curcuru 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 c3142c8 Fix for statistics of newly elected members
new 823488d Merge pull request #79 from rlenferink/members-inactive-bugfix
c3142c8 is described below
commit c3142c81e83339992cbf01aa363c37c6fb33c77d
Author: Roy Lenferink <le...@gmail.com>
AuthorDate: Thu Feb 6 21:04:48 2020 +0100
Fix for statistics of newly elected members
---
www/members/inactive.cgi | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/www/members/inactive.cgi b/www/members/inactive.cgi
index 5562228..e4f4e99 100755
--- a/www/members/inactive.cgi
+++ b/www/members/inactive.cgi
@@ -76,16 +76,23 @@ _html do
end
if active
att = miss = 0
- matrix.each do |date, status|
- if %w(A V P).include? status
- att += 1
- else
- miss += 1
+ if !matrix.nil?
+ matrix.each do |date, status|
+ if %w(A V P).include? status
+ att += 1
+ else
+ miss += 1
+ end
end
end
- _p.text_success "Great! Thanks for attending Member's meetings recently! Overall attends: #{att} Non-attends: #{miss}"
- if 0 == miss
- _p.text_success "WOW! 100% attendance rate - thanks!"
+
+ if 0 == miss && 0 == att
+ _p.text_success "No attendance for Member's meetings found yet"
+ else
+ _p.text_success "Great! Thanks for attending Member's meetings recently! Overall attends: #{att} Non-attends: #{miss}"
+ if 0 == miss
+ _p.text_success "WOW! 100% attendance rate - thanks!"
+ end
end
end