Caught error from testcase! Quickvote creation errors weren't being properly returned.
authorJohn Dong <jdong@mit.edu>
Fri, 17 Aug 2007 18:17:19 +0000 (14:17 -0400)
committerJohn Dong <jdong@mit.edu>
Fri, 17 Aug 2007 18:17:19 +0000 (14:17 -0400)
app/models/selectricity_service.rb

index 9d7d91ee258e095fbb226b4406a9a583b29f6507..9e276ef502e89b0a41acde7c7f9ef25412cb3342 100644 (file)
@@ -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

Benjamin Mako Hill || Want to submit a patch?