Support not having [filters] in config

Not everybody might have a default_project set ...
This commit is contained in:
MasterofJOKers 2022-09-20 22:56:37 +02:00
parent 6e2d639034
commit e7e286fbf3
1 changed files with 2 additions and 4 deletions

View File

@ -103,10 +103,8 @@ def version(client):
@pass_client
@pass_config
def issues(config, client, project, components, status, labels, texts, flagged, order, asc, jql):
filters_config = config['filters']
if not project and filters_config and 'default_project' in filters_config:
project = filters_config['default_project']
if not project 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