diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-01-16 15:47:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-16 15:47:55 +0100 |
commit | 59e3a7f87bd7d855774ef8caa1a7d795059251fc (patch) | |
tree | 523d98ed57a2cb67d695e74097798a5bfbd1a676 | |
parent | a4f07bad9529a6bebb6a0292c4ef0bfc6e29c4d2 (diff) |
Fix `tootctl domains crawl` with JSON format output crash (#9820)
Fix #9817
-rw-r--r-- | lib/mastodon/domains_cli.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/mastodon/domains_cli.rb b/lib/mastodon/domains_cli.rb index be68ae84b..303b8a94a 100644 --- a/lib/mastodon/domains_cli.rb +++ b/lib/mastodon/domains_cli.rb @@ -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 |