Projet

Général

Profil

Bug #89270

ZeroDivisionError sur les infos d'abandon de brouillon

Ajouté par Frédéric Péters il y a 22 jours. Mis à jour il y a 21 jours.

Statut:
Solution déployée
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
08 avril 2024
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Non
Planning:
Non

Description

Pour autre chose je pioche au hasard en local une démarche où je pense avoir des brouillons et plouf :

Exception:
  type = '<class 'ZeroDivisionError'>', value = 'division by zero'

Stack trace (most recent call first):
  File "/home/fred/src/eo/wcs/wcs/admin/forms.py", line 1807, in render_inspect
  1805                 draft_data['percent'] = draft_percent
  1806                 draft_data['percent_str'] = '%.1f' % draft_percent
> 1807                 to_formdata_percent = 100 * draft_data['total'] / total_formdata
  1808                 draft_data['to_formdata_percent'] = to_formdata_percent
  1809                 draft_data['to_formdata_percent_str'] = '%.1f' % to_formdata_percent

  locals: 
     context = {'formdef': <FormDef 'debug nanterre 77610' id:659>, 'view': <wcs.admin.forms.FormDefPage object at 0x7fe4cc383b10>, 'has_sidebar': False, 'workflow_roles': [('_receiver', 'Destinataire', '-')], 'backoffice_submission_roles': 'Aucun', 'custom_views': [], 'deprecations': {'now': '2024-03-21 08:08:35', 'report_lines': []}, 'deprecation_titles': {'ezt': 'Texte EZT', 'jsonp': 'Source de données JSONP', 'python-condition': 'Condition Python', 'python-expression': 'Expression Python', 'python-prefill': 'Préremplissage Python', 'python-data-source': 'Source de données Python', 'rtf': 'Documents RTF', 'script': 'Script sur le système de fichiers', 'fields': 'Types de champ dépréciés', 'actions': 'Types d’actions dépréciés', 'csv-connector': 'Connecteur «\xa0Fichier tableur\xa0»', 'json-data-store': 'Connecteur «\xa0Stockage de données JSON\xa0»'}}
     custom_views = []
     deprecations = <wcs.backoffice.deprecations.DeprecationsDirectory object at 0x7fe4cc3b1290>
     draft_data = {'total': 0, 'field': None, 'page_index': -1000, 'percent': 0.0, 'percent_str': '0.0'}
     draft_percent = 0.0

Révisions associées

Révision 8b568965 (diff)
Ajouté par Frédéric Péters il y a 22 jours

misc: adjust style of stat bars for better readability of low % (#89270)

Révision 0218b41a (diff)
Ajouté par Frédéric Péters il y a 22 jours

misc: also consider receipt time when counting drafts (#89270)

Révision 43a38f86 (diff)
Ajouté par Frédéric Péters il y a 22 jours

misc: do not double context variables for draft stats (#89270)

Révision c8e926af (diff)
Ajouté par Frédéric Péters il y a 22 jours

tests: add a check for drafts stats among total forms (#89270)

Historique

#1

Mis à jour par Robot Gitea il y a 22 jours

  • Statut changé de Nouveau à En cours

Frédéric Péters (fpeters) a ouvert une pull request sur Gitea concernant cette demande :

#2

Mis à jour par Robot Gitea il y a 22 jours

  • Statut changé de En cours à Solution proposée
#3

Mis à jour par Robot Gitea il y a 21 jours

  • Statut changé de Solution proposée à Solution validée

Lauréline Guérin (lguerin) a approuvé une pull request sur Gitea concernant cette demande :

#4

Mis à jour par Robot Gitea il y a 21 jours

  • Statut changé de Solution validée à Résolu (à déployer)

Frédéric Péters (fpeters) a mergé une pull request sur Gitea concernant cette demande :

#5

Mis à jour par Transition automatique il y a 21 jours

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF