Fix `tootctl domains crawl` with JSON format output crash (#9820)

Fix #9817
lolsob-rspec
Eugen Rochko 2019-01-16 15:47:55 +01:00 committed by GitHub
parent b8867a3412
commit 7a4958b028
1 changed files with 2 additions and 9 deletions

View File

@ -140,15 +140,8 @@ module Mastodon
end
def stats_to_json(stats)
totals.each_key do |domain|
if totals[domain].is_a?(Hash)
totals[domain]['activity'] = stats[domain]
else
totals.delete(domain)
end
end
say(Oj.dump(totals))
stats.compact!
say(Oj.dump(stats))
end
end
end