Commit 2f78ff2e by Chris Dodge Committed by Jonathan Piacenti

be sure to initialize the thread_ids dictionary for the single user case

parent c4018cf1
...@@ -101,6 +101,7 @@ get "#{APIPREFIX}/users/:user_id/social_stats" do |user_id| ...@@ -101,6 +101,7 @@ get "#{APIPREFIX}/users/:user_id/social_stats" do |user_id|
"num_flagged" => 0, "num_flagged" => 0,
"num_comments_generated" => 0 "num_comments_generated" => 0
} }
thread_ids[user_id] = []
end end
content.each do |item| content.each do |item|
...@@ -116,7 +117,6 @@ get "#{APIPREFIX}/users/:user_id/social_stats" do |user_id| ...@@ -116,7 +117,6 @@ get "#{APIPREFIX}/users/:user_id/social_stats" do |user_id|
"num_flagged" => 0, "num_flagged" => 0,
"num_comments_generated" => 0 "num_comments_generated" => 0
} }
thread_ids[user_id] = [] thread_ids[user_id] = []
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment