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

Consider only open requests when listing requests with a given review state

This commit is contained in:
Daniel Mach 2023-05-09 16:12:21 +02:00
parent ba1b3c791b
commit 00decd25d1

View File

@ -4720,9 +4720,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)