mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-04 18:46:17 +01:00
* avoid hardcoded list request states for "all" case
This commit is contained in:
parent
86c110f1e9
commit
17508f3d83
11
osc/core.py
11
osc/core.py
@ -2330,12 +2330,11 @@ def get_request_list(apiurl, project, package, req_who='', req_state=('new',), r
|
||||
matches = []
|
||||
match = ''
|
||||
m = ''
|
||||
if "all" in req_state:
|
||||
req_state=('new', 'accepted', 'declined', 'revoked', 'rejected')
|
||||
for state in req_state:
|
||||
if len(m): m += '%20or%20'
|
||||
m += 'state/@name=\'%s\'' % quote_plus(state)
|
||||
if len(m): match += "(" + m + ")"
|
||||
if not "all" in req_state:
|
||||
for state in req_state:
|
||||
if len(m): m += '%20or%20'
|
||||
m += 'state/@name=\'%s\'' % quote_plus(state)
|
||||
if len(m): match += "(" + m + ")"
|
||||
m = ''
|
||||
if req_who:
|
||||
if len(m): m += '%20and%20'
|
||||
|
Loading…
Reference in New Issue
Block a user