Bug #61517
affichage libellé fonction combinant des utilisateurs et rôles
Début:
07 février 2022
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Quand le premier élément de la fonction est un utilisateur et que derrière arrive un rôle,
Exception: type = '<class 'IndexError'>', value = 'list index out of range' Stack trace (most recent call first): File "/home/fred/src/eo/wcs/wcs/formdata.py", line 118, in <listcomp> 116 if str(role_ids[0]).startswith('_user:'): 117 try: > 118 users = [get_publisher().user_class.get(role_id.split(':')[1]) for role_id in role_ids] 119 except KeyError: 120 continue locals: .0 = <list_iterator object at 0x7f2f073d0e80> role_id = '22e0026188404693be9de2067cc5718a' File "/home/fred/src/eo/wcs/wcs/formdata.py", line 120, in get_workflow_roles_substitution_variables 118 users = [get_publisher().user_class.get(role_id.split(':')[1]) for role_id in role_ids] 119 except KeyError: > 120 continue 121 d['%sname' % _prefix] = ', '.join([u.name for u in users]) 122 continue locals: _prefix = 'form_role_gestionnaire_' d = {'form_role_receiver_name': 'Debug', 'form_role_receiver_details': 'World Hello.', 'form_role_receiver_emails': ''} prefix = 'form_role_' role_id = '22e0026188404693be9de2067cc5718a' role_ids = ['_user:1', '22e0026188404693be9de2067cc5718a']
Fichiers
Historique
Mis à jour par Frédéric Péters il y a environ 2 ans
- Fichier 0001-formdata-handle-function-name-variables-with-combine.patch 0001-formdata-handle-function-name-variables-with-combine.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
(vu en travaillant #58881)
Mis à jour par Frédéric Péters il y a environ 2 ans
Mis à jour par Thomas Noël il y a environ 2 ans
- Statut changé de Solution proposée à Solution validée
Je suis pas sûr qu'on (moi?) arrivera à relire ce bout de code facilement, mais il est assez anecdotique alors hop, go !
Mis à jour par Frédéric Péters il y a environ 2 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit e9445f93847f62a7c948c74f7301077f29276d01 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Mon Feb 7 18:33:16 2022 +0100 formdata: handle function name variables with combined users and roles (#58881)
Mis à jour par Frédéric Péters il y a presque 2 ans
- Statut changé de Résolu (à déployer) à Solution déployée