Bug #78780
get_by_id passé sous forme de liste, crash
Début:
20 juin 2023
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Non
Planning:
Non
Description
Exception: type = '<class 'TypeError'>', value = 'int() argument must be a string, a bytes-like object or a number, not 'list'' Stack trace (most recent call first): File "/usr/lib/python3/dist-packages/wcs/carddef.py", line 245, in get_data_source_items 243 except ValueError: 244 # get_by_id not an integer, it could be id_display > 245 criterias.append(Equal('id_display', get_by_id)) 246 else: 247 criterias.append(Equal('id', get_by_id)) locals: carddef = <CardDef 'Catégorie de marché' id:57> cls = <class 'wcs.carddef.CardDef'> criterias = [<StrictNotEqual (attribute: 'status', value: 'draft')>, <Null (attribute: 'anonymised', value: None)>] custom_view = <CustomView id:179> data_source_id = 'carddef:categorie-de-marche:vue-par-defaut' digest_key = '********************' get_by_id = [4] get_by_text = None limit = None order_by = 'f1' parts = ['carddef', 'categorie-de-marche', 'vue-par-defaut'] query = None view_digest_key = '********************' with_related_urls = False
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a 10 mois
<custom_view> <title>Filtre par marché par catégorie et bio ou non</title> <slug>filtre-par-marche-bio-ou-non</slug> <visibility>datasource</visibility> <filters> <filter-5>on</filter-5> <filter-5-operator>in</filter-5-operator> <filter-5-value>4</filter-5-value> <filter-6>on</filter-6> <filter-6-operator>eq</filter-6-operator> <filter-6-value>{{ form_var_bio }}</filter-6-value> </filters> <columns> <id>id</id> <id>time</id> <id>1</id> </columns> <order_by>f1</order_by> </custom_view>
Mis à jour par Robot Gitea il y a 10 mois
- Statut changé de Nouveau à En cours
- Assigné à mis à Lauréline Guérin
Lauréline Guérin (lguerin) a ouvert une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/wcs/pulls/413
- Titre : WIP: customviews: fix filtering with in operator on item field with carddef (#78780)
- Modifications : https://git.entrouvert.org/entrouvert/wcs/pulls/413/files
Mis à jour par Robot Gitea il y a 10 mois
- Statut changé de Solution proposée à Solution validée
Frédéric Péters (fpeters) a approuvé une pull request sur Gitea concernant cette demande :
Mis à jour par Robot Gitea il y a 10 mois
- Statut changé de Solution validée à Résolu (à déployer)
Lauréline Guérin (lguerin) a mergé une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/wcs/pulls/413
- Titre : customviews: fix filtering with in operator on item field with carddef (#78780)
- Modifications : https://git.entrouvert.org/entrouvert/wcs/pulls/413/files
Mis à jour par Transition automatique il y a 10 mois
- Statut changé de Résolu (à déployer) à Solution déployée
customviews: fix filtering with in operator on item field with carddef (#78780)