Commit 970b8d3b3ae7882506bcd8a1764d4d8ae367207a

Authored by Dhruv Kapadia
1 parent 9156396e

Ignoring bad session ids for uploaded idea summary info

Showing 1 changed file with 7 additions and 0 deletions   Show diff stats
app/controllers/questions_controller.rb
... ... @@ -174,10 +174,17 @@ class QuestionsController < InheritedResources::Base
174 174 :conditions => "items.creator_id != #{@question.creator_id}",
175 175 :group => 'creator_id')
176 176  
  177 + count = 0
177 178 uploaded_ideas_by_visitor_id.each do |visitor|
178 179 v = Visitor.find(visitor.creator_id, :select => 'identifier')
179 180  
180 181 logger.info(v.identifier)
  182 +
  183 + if v.identifier.include?(" ") || v.identifier.include?("'")
  184 + v.identifier = "no_data#{count}"
  185 + count +=1
  186 + end
  187 + logger.info(v.identifier)
181 188  
182 189 visitor_id_hash[v.identifier] = visitor.ideas_count
183 190 end
... ...