Project

General

Profile

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')

Added by Sentry Io 9 months ago. Updated 9 months ago.

Status:
Fermé
Priority:
Normal
Target version:
-
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

Related to w.c.s. - 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...)Fermé22 May 2024

Actions

Associated revisions

Revision 884210f2 (diff)
Added by Frédéric Péters 9 months ago

fields: check type of item prefill value (#90572)

History

#1

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
#2

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 :

#3

Updated by Robot Gitea 9 months ago

  • Status changed from En cours to Solution proposée
#4

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 :

#5

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 :

#6

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
#7

Updated by Transition automatique 9 months ago

  • Status changed from Résolu (à déployer) to Solution déployée
#8

Updated by Transition automatique 7 months ago

Automatic expiration

Also available in: Atom PDF