Il 28/05/20 19:04, Fabio Valentini ha scritto:
>
> Since bugzilla keeps track of which user set which flag, do you maybe
> need to specify which user's needinfo flag you want to clear?
>
> Fabio
>
I'm already passing all the flag object properties, id included:

 >>> bug = bz.getbug(1730464)
 >>> flags = bug.flags
 >>> flags
[{'status': '?', 'name': 'fedora-review', 'modification_date': <DateTime 
'20200528T16:04:43' at 0x7f2af35903a0>, 'creation_date': <DateTime 
'20200528T16:04:43' at 0x7f2af3590400>, 'is_active': 1, 'type_id': 65, 
'id': 4045137, 'setter': '[email protected]'}, {'requestee': 
'[email protected]', 'status': '?', 'name': 'needinfo', 
'modification_date': <DateTime '20200528T16:36:27' at 0x7f2af3590490>, 
'creation_date': <DateTime '20200528T16:36:27' at 0x7f2af35904c0>, 
'is_active': 1, 'type_id': 16, 'id': 4045139, 'setter': 
'[email protected]'}]
 >>> for idx, flag in enumerate(flags):
...     if 'name' in flag and flag['name'] in ['needinfo', 'fedora-review']:
...             flags[idx]['status'] = 'X'
...
 >>> update = bz.build_update(flags=flags)
 >>> update
{'flags': [{'status': 'X', 'name': 'fedora-review', 'modification_date': 
<DateTime '20200528T16:04:43' at 0x7f2af35903a0>, 'creation_date': 
<DateTime '20200528T16:04:43' at 0x7f2af3590400>, 'is_active': 1, 
'type_id': 65, 'id': 4045137, 'setter': '[email protected]'}, 
{'requestee': '[email protected]', 'status': 'X', 'name': 
'needinfo', 'modification_date': <DateTime '20200528T16:36:27' at 
0x7f2af3590490>, 'creation_date': <DateTime '20200528T16:36:27' at 
0x7f2af35904c0>, 'is_active': 1, 'type_id': 16, 'id': 4045139, 'setter': 
'[email protected]'}]}

I've also tried to change the setter or the requestee, since the error 
mentions a 'user account', but I always end with an error.

Mattia

_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]

Reply via email to