Browse Source

Bugfix. We might not have a @poll for this district and election. #19

tags/last-sinatra-version
Adrian Short 9 years ago
parent
commit
79108daeb0
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app.rb

+ 1
- 1
app.rb View File

@@ -261,7 +261,7 @@ get '/bodies/:body/elections/:date/:districts_name/:district' do

if @total_seats == 1
@share_denominator = @total_votes
elsif @poll.valid_ballot_papers
elsif @poll && @poll.valid_ballot_papers
@share_denominator = @poll.valid_ballot_papers
else
@share_denominator = @total_votes / @total_seats


Loading…
Cancel
Save