Sfoglia il codice sorgente

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

tags/last-sinatra-version
Adrian Short 9 anni fa
parent
commit
79108daeb0
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      app.rb

+ 1
- 1
app.rb Vedi 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


Caricamento…
Annulla
Salva