mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-11 07:06:16 +01:00
Merge pull request #1254 from dmach/fix-rq-list-without-type-option
rq list: Fix a traceback when --type is not specified
This commit is contained in:
commit
f25b503315
6
behave/features/request-list.feature
Normal file
6
behave/features/request-list.feature
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Feature: `osc request list` command
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Run `osc request list` on a project
|
||||||
|
When I execute osc with args "request list -P test:factory"
|
||||||
|
Then the exit code is 0
|
@ -2771,9 +2771,10 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
req_type=opts.type, exclude_projects=opts.exclude_target_project or [])
|
req_type=opts.type, exclude_projects=opts.exclude_target_project or [])
|
||||||
else:
|
else:
|
||||||
roles = ["creator"] if opts.mine else None
|
roles = ["creator"] if opts.mine else None
|
||||||
|
types = [opts.type] if opts.type else None
|
||||||
results = get_request_collection(
|
results = get_request_collection(
|
||||||
apiurl, project=project, package=package, user=who,
|
apiurl, project=project, package=package, user=who,
|
||||||
states=state_list, types=[opts.type], roles=roles)
|
states=state_list, types=types, roles=roles)
|
||||||
|
|
||||||
# Check if project actually exists if result list is empty
|
# Check if project actually exists if result list is empty
|
||||||
if not results:
|
if not results:
|
||||||
|
Loading…
Reference in New Issue
Block a user