Commit 5580b9ddc7ab0ddc9b48394b5355b12caffb9b0a
1 parent
e8499507
Exists in
master
and in
1 other branch
Bug fix - not checking for nil identifiers
Showing
1 changed file
with
4 additions
and
2 deletions
Show diff stats
app/controllers/questions_controller.rb
| ... | ... | @@ -182,7 +182,6 @@ class QuestionsController < InheritedResources::Base |
| 182 | 182 | visitor_id_hash[v.identifier] = visitor.ideas_count |
| 183 | 183 | end |
| 184 | 184 | |
| 185 | - logger.info(visitor_id_hash.inspect) | |
| 186 | 185 | elsif object_type == "bounces" |
| 187 | 186 | |
| 188 | 187 | possible_bounces = @question.appearances.count(:group => :voter_id, :having => 'count_all = 1') |
| ... | ... | @@ -195,7 +194,10 @@ class QuestionsController < InheritedResources::Base |
| 195 | 194 | |
| 196 | 195 | bounces.each do |visitor_id| |
| 197 | 196 | v = Visitor.find(visitor_id, :select => 'identifier') |
| 198 | - visitor_id_hash[v.identifier] = 1 | |
| 197 | + | |
| 198 | + if v.identifier | |
| 199 | + visitor_id_hash[v.identifier] = 1 | |
| 200 | + end | |
| 199 | 201 | end |
| 200 | 202 | end |
| 201 | 203 | respond_to do |format| | ... | ... |