Bug #90572
préremplissage d'un champ liste (sourcée sur des fiches) avec une liste (TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list')
Start date:
14 May 2024
Due date:
% Done:
0%
Estimated time:
Patch proposed:
No
Planning:
No
Description
https://sentry.entrouvert.org/entrouvert/publik/issues/126069/
il ne faudrait pas de crash ici, mais remonter l'erreur.
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list' (22 additional frame(s) were not displayed) ... File "wcs/fields/item.py", line 347, in get_prefill_value struct_value = data_source.get_structured_value(value) File "wcs/data_sources.py", line 1115, in get_structured_value value = self.get_card_structured_value_by_id(option_id) File "wcs/data_sources.py", line 1099, in get_card_structured_value_by_id values = CardDef.get_data_source_items(self.type, get_by_id=option_id) File "wcs/carddef.py", line 258, in get_data_source_items criterias.append(carddef.get_by_id_criteria(get_by_id)) File "wcs/formdef.py", line 899, in get_by_id_criteria if int(value) >= 2**31:
Related issues
Associated revisions
History
Updated by Frédéric Péters 9 months ago
- Project changed from Suivi des traces to w.c.s.
- Description updated (diff)
- Assignee set to Frédéric Péters
Updated by Robot Gitea 9 months ago
- Status changed from Nouveau to En cours
Frédéric Péters (fpeters) a ouvert une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/wcs/pulls/1502
- Titre : WIP: fields: check type of item prefill value (#90572)
- Modifications : https://git.entrouvert.org/entrouvert/wcs/pulls/1502/files
Updated by Robot Gitea 9 months ago
- Status changed from Solution proposée to Solution validée
Lauréline Guérin (lguerin) a approuvé une pull request sur Gitea concernant cette demande :
Updated by Robot Gitea 9 months ago
- Status changed from Solution validée to Résolu (à déployer)
Frédéric Péters (fpeters) a mergé une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/wcs/pulls/1502
- Titre : fields: check type of item prefill value (#90572)
- Modifications : https://git.entrouvert.org/entrouvert/wcs/pulls/1502/files
Updated by Frédéric Péters 9 months ago
- Related to Bug #90936: prefill, get_by_id_criteria appelé avec un LazyFormDefObjectsManager (TypeError: int() argument must be a string, a bytes-like object or a real number, not 'LazyFormDefObjectsMan...) added
Updated by Transition automatique 9 months ago
- Status changed from Résolu (à déployer) to Solution déployée
fields: check type of item prefill value (#90572)