瀏覽代碼

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

tags/last-sinatra-version
Adrian Short 9 年之前
父節點
當前提交
79108daeb0
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      app.rb

+ 1
- 1
app.rb 查看文件

@@ -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…
取消
儲存