From e682e1ecce33417f8410e71bd58d385c47e37c5b Mon Sep 17 00:00:00 2001 From: John Dong Date: Thu, 16 Aug 2007 13:09:31 -0400 Subject: [PATCH] Fix crasher when nil is passed to ident_to_quickvote --- app/models/quick_vote.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/quick_vote.rb b/app/models/quick_vote.rb index c427b98..ce4a4fb 100644 --- a/app/models/quick_vote.rb +++ b/app/models/quick_vote.rb @@ -75,6 +75,7 @@ class QuickVote < Election ### Convert a shortname or id into a QuickVote def self.ident_to_quickvote(ident) + return nil unless ident if ident.match(/^\d+$/) quickvote = QuickVote.find(ident) else -- 2.39.5