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 00fb2784 Allow for missing YAML file [skip ci] 00fb2784 is described below commit 00fb27841a2d4840e228d660bb3ee4409b8bd75a Author: Sebb <s...@apache.org> AuthorDate: Fri Dec 29 23:58:02 2023 +0000 Allow for missing YAML file [skip ci] --- www/board/agenda/routes.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb index 94dd81f2..cf94d911 100755 --- a/www/board/agenda/routes.rb +++ b/www/board/agenda/routes.rb @@ -551,7 +551,12 @@ get '/new' do @owner = ASF::Board::ShepherdStream.new(actions) # Get list of unpublished and unapproved minutes - draft = YAML.load_file(Dir["#{AGENDA_WORK}/board_minutes*.yml"].max) + latest = Dir["#{AGENDA_WORK}/board_minutes*.yml"].max + if latest + draft = YAML.load_file(latest) + else + draft = {} # allow for missing yml file + end @minutes = dir("board_agenda_*.txt"). map {|file| Date.parse(file[/\d[_\d]+/].gsub('_', '-'))}. reject {|date| date >= @meeting.to_date}.