Bug #71197
statistiques, crash sur un appel nombre de fiches sans regroupement temporel
Début:
09 novembre 2022
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Précision également, ça concerne un regroupement sur une liste à choix multiples.
https://sentry.entrouvert.org/entrouvert/publik/issues/96711/
TypeError: unhashable type: 'list' (3 additional frame(s) were not displayed) ... File "django/views/generic/base.py", line 71, in view return self.dispatch(request, *args, **kwargs) File "wcs/statistics/views.py", line 38, in dispatch return super().dispatch(*args, **kwargs) File "django/views/generic/base.py", line 97, in dispatch return handler(request, *args, **kwargs) File "wcs/statistics/views.py", line 250, in get x_labels = [group_labels.get(x[0], x[0]) for x in totals] File "wcs/statistics/views.py", line 250, in <listcomp> x_labels = [group_labels.get(x[0], x[0]) for x in totals]
Fichiers
Révisions associées
Historique
Mis à jour par Valentin Deniaud il y a plus d'un an
- Projet changé de Suivi des traces à w.c.s.
- Description mis à jour (diff)
- Assigné à mis à Valentin Deniaud
Mis à jour par Valentin Deniaud il y a plus d'un an
- Fichier 0001-statistics-support-group-by-items-field-without-time.patch 0001-statistics-support-group-by-items-field-without-time.patch ajouté
- Tracker changé de Bug à Development
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
C'est un bug qui concerne indifféremment fiches et formulaires, par contre le combo pas de regroupement temporel + liste à choix multiple est effectivement le coupable.
J'ai oublié ce cas dans #63377, d'ailleurs la partie
- if 'group_by' not in totals_kwargs: - x_labels = [x[0] for x in totals] + if time_interval == 'none' or 'group_by' not in totals_kwargs: + x_labels = [group_labels.get(x[0], x[0]) for x in totals]
introduite par le 0002 est foireuse, c'est mélanger torchons et serviettes, je reviens dessus dans ce patch en traitant bien le nouveau cas time_interval == 'none' séparément.
Mis à jour par Benjamin Dauvergne il y a plus d'un an
- Statut changé de Solution proposée à Solution validée
Mis à jour par Valentin Deniaud il y a plus d'un an
- Statut changé de Solution validée à Résolu (à déployer)
commit f6c54069168c14d27c4f88c1b3a28c1893fd2a76 Author: Valentin Deniaud <vdeniaud@entrouvert.com> Date: Wed Nov 9 18:04:55 2022 +0100 statistics: support group by items field without time interval (#71197)
Mis à jour par Transition automatique il y a plus d'un an
- Statut changé de Résolu (à déployer) à Solution déployée
statistics: support group by items field without time interval (#71197)