Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Commit

Permalink
Merge pull request #70 from vetinari/optional-search-param
Browse files Browse the repository at this point in the history
make search argument optional
  • Loading branch information
vetinari authored Sep 7, 2017
2 parents e8f730f + 9e17a02 commit 375550a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions zmon_cli/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,6 @@ def search(self, q, limit: int=None, teams: list=None) -> dict:
"grafana_dashboards": [{"id": "123", "title": "ZMON grafana", "team": ""}],
}
"""
if not q:
raise ZmonArgumentError('No search query value!')

if teams and type(teams) not in (list, tuple):
raise ZmonArgumentError('"teams" should be a list!')

Expand Down
2 changes: 1 addition & 1 deletion zmon_cli/cmds/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


@cli.command()
@click.argument('search_query')
@click.argument('search_query', default="")
@click.option('--team', '-t', multiple=True, required=False,
help='Filter search by team. Multiple teams filtering is supported.')
@click.option('--limit', '-l', multiple=False, required=False,
Expand Down

0 comments on commit 375550a

Please sign in to comment.