mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-24 17:16:12 +01:00
Fix logic error in do_my
A dict doesn't work here (however, this codepath shouldn't be reached at all).
This commit is contained in:
parent
e9cc000987
commit
2816f325ca
@ -6909,18 +6909,19 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
# if list of packages is empty user is maintainer of the whole project
|
||||
request_todo = {}
|
||||
|
||||
dummy_elm = ET.Element('dummy')
|
||||
roles = {}
|
||||
if len(what.keys()) == 2:
|
||||
for i in res.get('project_id', res.get('project', {})).findall('project'):
|
||||
for i in res.get('project_id', res.get('project', dummy_elm)).findall('project'):
|
||||
request_todo[i.get('name')] = []
|
||||
roles[i.get('name')] = [p.get('role') for p in i.findall('person') if p.get('userid') == user]
|
||||
for i in res.get('package_id', res.get('package', {})).findall('package'):
|
||||
for i in res.get('package_id', res.get('package', dummy_elm)).findall('package'):
|
||||
prj = i.get('project')
|
||||
roles['/'.join([prj, i.get('name')])] = [p.get('role') for p in i.findall('person') if p.get('userid') == user]
|
||||
if not prj in request_todo or request_todo[prj] != []:
|
||||
request_todo.setdefault(prj, []).append(i.get('name'))
|
||||
else:
|
||||
for i in res.get('project_id', res.get('project', {})).findall('project'):
|
||||
for i in res.get('project_id', res.get('project', dummy_elm)).findall('project'):
|
||||
roles[i.get('name')] = [p.get('role') for p in i.findall('person') if p.get('userid') == user]
|
||||
|
||||
if list_requests:
|
||||
|
Loading…
Reference in New Issue
Block a user