1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-14 00:06:15 +01:00

Merge pull request #1319 from dmach/review-list-state

Consider only open requests when listing requests with a given review state
This commit is contained in:
Daniel Mach 2023-05-09 16:54:28 +02:00 committed by GitHub
commit dc50e6c981
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4722,9 +4722,11 @@ def get_review_list(
return ''
xpath = ''
# we're interested only in reviews of requests that are still open
xpath = xpath_join(xpath, "(state/@name='new' or state/@name='review' or state/@name='declined')", op="and")
if states == ():
# default: requests which are still open and have reviews in "new" state
xpath = xpath_join('', 'state/@name=\'review\'', op='and')
xpath = xpath_join(xpath, 'review/@state=\'new\'', op='and')
if byuser:
xpath = build_by(xpath, '@by_user=\'%s\'' % byuser)