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 2017/10/13 18:25:08 UTC

[whimsy] branch master updated: guard against file being nil

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 407eed7  guard against file being nil
407eed7 is described below

commit 407eed745de44f819ae4fb8ad3367f6187edc983
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Fri Oct 13 14:24:53 2017 -0400

    guard against file being nil
---
 www/board/agenda/models/pending.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/models/pending.rb b/www/board/agenda/models/pending.rb
index 427b600..7288465 100644
--- a/www/board/agenda/models/pending.rb
+++ b/www/board/agenda/models/pending.rb
@@ -8,7 +8,7 @@ class Pending
   def self.get(user, agenda=nil)
 
     file = work_file(user)
-    response = (File.exist?(file) ? YAML.load_file(file) : {})
+    response = ((file and File.exist?(file)) ? YAML.load_file(file) : {})
 
     # reset pending when agenda changes
     if agenda and agenda > response['agenda'].to_s

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].