From: John Dong Date: Fri, 17 Aug 2007 18:17:19 +0000 (-0400) Subject: Caught error from testcase! Quickvote creation errors weren't being properly returned. X-Git-Url: https://projects.mako.cc/source/selectricity-live/commitdiff_plain/7bc8f21d6a7593a082797dd41d6fc9005bc4f112 Caught error from testcase! Quickvote creation errors weren't being properly returned. --- diff --git a/app/models/selectricity_service.rb b/app/models/selectricity_service.rb index 9d7d91e..9e276ef 100644 --- a/app/models/selectricity_service.rb +++ b/app/models/selectricity_service.rb @@ -98,7 +98,7 @@ class SelectricityService < ActionWebService::Base def create_quickvote(election) qv=QuickVote.new(:name => election.name, :description => election.description) qv.candidatelist=election.candidate_names - if qv.save.to_s + if qv.save return "" else return "Saving quickvote FAILED:"+qv.errors.inspect