Let the user query issues without default project

When the user sets --project to an empty string, we will not add the
default project from the config anymore.
This commit is contained in:
MasterofJOKers 2022-10-25 22:30:39 +02:00
parent 6c1667046b
commit 6596be6c1e
1 changed files with 2 additions and 2 deletions

View File

@ -102,9 +102,8 @@ def version(client):
@pass_client
@pass_config
def issues(config, client, project, components, status, labels, texts, flagged, order, asc, jql):
if not project and config.has_section('filters') and config.get('filters', 'default_project'):
if project is None and config.has_section('filters') and config.get('filters', 'default_project'):
project = config['filters']['default_project']
project_jql = f"project = {project}"
# TODO add filtering by created since
# TODO add filtering by updated
@ -145,6 +144,7 @@ def issues(config, client, project, components, status, labels, texts, flagged,
filters.append(flagged_jql)
if project:
project_jql = f"project = {project}"
filters.append(project_jql)
jql = ' AND '.join(filters)