Skip to content

Commit

Permalink
only update params with values
Browse files Browse the repository at this point in the history
  • Loading branch information
unclebconnor committed Oct 3, 2019
1 parent 1189437 commit 66a24ab
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions datadog/dogshell/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,12 @@ def _update(cls, args):
to_update['type'] = args.type_opt
if args.query_opt:
to_update['query'] = args.query_opt

# these are not required for validation so no need to exclude if None
to_update['name'] = args.name
to_update['message'] = args.message
to_update['options'] = args.options
if args.name:
to_update['name'] = args.name
if args.message:
to_update['message'] = args.message
if args.options:
to_update['options'] = args.options

res = api.Monitor.update(args.monitor_id, **to_update)

Expand Down

0 comments on commit 66a24ab

Please sign in to comment.