You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2020/06/15 16:00:39 UTC

[whimsy] branch master updated: case insensitive search for board summary tab;

This is an automated email from the ASF dual-hosted git repository.

rubys 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 1b6f506  case insensitive search for board summary tab;
1b6f506 is described below

commit 1b6f50613609994f371e054f3a47b15303f2b154
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Mon Jun 15 12:00:03 2020 -0400

    case insensitive search for board summary tab;
    
    better error reporting if tab is not found
---
 www/board/agenda/views/actions/financials.json.rb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/views/actions/financials.json.rb b/www/board/agenda/views/actions/financials.json.rb
index e2e1f76..5d42b68 100644
--- a/www/board/agenda/views/actions/financials.json.rb
+++ b/www/board/agenda/views/actions/financials.json.rb
@@ -22,7 +22,14 @@ end
 
 # extract data
 rows = []
-worksheet['Board Summary'].each do |row|
+
+summary = worksheet.find do |sheet|
+  sheet.sheet_name.strip.downcase == 'board summary'
+end
+
+raise 'board summary tab not found' unless summary
+
+summary.each do |row|
   data = []
 
   row && row.cells.each do |cell|