Netflix-Skunkworks / Scumblr

Web framework that allows performing periodic syncs of data sources and performing analysis on the identified results
Apache License 2.0
2.64k stars 317 forks source link

Twitter Searching error #179

Closed przem100 closed 7 years ago

przem100 commented 7 years ago

Hi All, I got 'Unable to run task Twitter vulnerability' error during twitter task running. I have found trivial error in lib/search_providers/provider.rb in line 113 there is: @event_metadata[level] ||= [] and should be: @event_metadata[level] ||= {}

After correction it works great

Please correct before next release

Regards

sbehrens commented 7 years ago

Hi @przem100,

Would you mind providing the error with full stack trace you are seeing. Looking at the code block:

      @event_metadata[level] ||= []
      @event_metadata[level] << event_details.id

That object should be an array, as we are using it to store event_details.id. Using << to append to the array. I'm not sure why making that a hash would work, you cannot append to a hash using the << operator.