projects
/
selectricity-live
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix crasher when nil is passed to ident_to_quickvote
[selectricity-live]
/
app
/
models
/
quick_vote.rb
diff --git
a/app/models/quick_vote.rb
b/app/models/quick_vote.rb
index c427b981d78120d54ee429f8f2ee9280f9f310a9..ce4a4fb5d3fe1dd142e4db139262c68c5bc6a069 100644
(file)
--- 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
Benjamin Mako Hill
||
Want to submit a patch?