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

- get_user_projpkgs_request_list: fixed logic error

This commit is contained in:
Marcus Huewe 2011-02-24 14:10:53 +01:00
parent 0ee18d1d7e
commit 0a67840310

View File

@ -3646,10 +3646,12 @@ def get_user_projpkgs_request_list(apiurl, user, req_state=('new','review',), re
Return all running requests for all projects/packages where is user is involved"""
if not projpkgs:
res = get_user_projpkgs(apiurl, user, exclude_projects=exclude_projects)
projects = []
for i in res['project_id'].findall('project'):
projpkgs[i.get('name')] = []
projects.append(i.get('name'))
for i in res['package_id'].findall('package'):
if not i.get('project') in projpkgs.keys():
if not i.get('project') in projects:
projpkgs.setdefault(i.get('project'), []).append(i.get('name'))
xpath = ''
for prj, pacs in projpkgs.iteritems():