Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix aggregate command with option --json #331

Merged
merged 1 commit into from
Oct 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix aggregate command with option --json
PR #330 forgot to fix the aggregate command (see bug #329).
  • Loading branch information
ericguirbal committed Oct 19, 2019
commit 0c4bea2715c4eea1f7d80108a310c1c187f1db86
3 changes: 2 additions & 1 deletion watson/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,8 @@ def aggregate(ctx, watson, current, from_, to, projects, tags, output_format,
lines.append(u'\n'.join(output))

if 'json' in output_format:
click.echo(json.dumps(lines, indent=4, sort_keys=True))
click.echo(json.dumps(lines, indent=4, sort_keys=True,
default=json_arrow_encoder))
elif 'csv' in output_format:
click.echo(build_csv(lines))
elif pager or (pager is None and
Expand Down