Projet

Général

Profil

Bug #23826

crash sur brouillon plus disponible

Ajouté par Frédéric Péters il y a presque 6 ans. Mis à jour il y a plus de 5 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
14 mai 2018
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

Exception:
  type = '<type 'exceptions.KeyError'>', value = ''

Stack trace (most recent call first):
  File "/usr/lib/python2.7/dist-packages/wcs/sql.py", line 1486, in get
  1484             if ignore_errors:
  1485                 return None
> 1486             raise KeyError()
  1487         cur.close()
  1488         return cls._row2ob(row)

  locals:
     cls = <class 'wcs.formdef.Candidature-A-Un-Job-D-Ete'>
     conn = <connection object at 0x7fd7a27e7c58; dsn: 'dbname=wcs_demarches_nancy_fr', closed: 0>
     cur = <cursor object at 0x7fd7bbe38718; closed: -1>
     fields = ['f5', 'f5_display', 'f5_structured', 'f6', 'f7', 'f8', 'f9', 'f10', 'f13', 'f14', 'f16', 'f16_display', 'f16_structured', 'f30', 'f19', 'f20', 'f21', 'f22', 'f23', 'f24', 'f25', 'f26', 'f27', 'f28']
     id = 1364
     ignore_errors = False
     ignore_migration = False
     potential_comma = ', '
     row = None
     sql_statement = 'SELECT id, user_id, receipt_time, status, page_no, anonymised, workflow_data, id_display, workflow_roles, workflow_roles_array, concerned_roles_array, actions_roles_array, tracking_code, backoffice_submis
sion, submission_context, submission_channel, criticality_level, last_update_time\n                                  , \n                                  f5, f5_display, f5_structured, f6, f7, f8, f9, f10, f13, f14, f16,
f16_display, f16_structured, f30, f19, f20, f21, f22, f23, f24, f25, f26, f27, f28\n                             FROM formdata_104_candidature_a_un_job_d_ete\n                            WHERE id = %(id)s'
     x = ('last_update_time', 'timestamp')

  File "/usr/lib/python2.7/dist-packages/wcs/sql.py", line 342, in f
   340         except psycopg2.Error:
   341             get_connection().rollback()
>  342             raise
   343     return f
   344

  locals:
     args = (<class 'wcs.formdef.Candidature-A-Un-Job-D-Ete'>, 1364)
     func = <function get at 0x7fd7bc2f10c8>
     kwargs = {}

  File "/usr/lib/python2.7/dist-packages/wcs/forms/root.py", line 998, in get_current_draft
   996             if draft_formdata_id:
   997                 # there was a draft, use it.
>  998                 return self.formdef.data_class().get(draft_formdata_id)
   999         return None

Je n'arrive pas à voir comment ça arrive.


Fichiers

Révisions associées

Révision a3758491 (diff)
Ajouté par Frédéric Péters il y a presque 6 ans

misc: do not crash on draft suddenly not available (#23826)

Historique

#1

Mis à jour par Frédéric Péters il y a presque 6 ans

#2

Mis à jour par Thomas Noël il y a presque 6 ans

Ça n'a quand même pas beaucoup de sens, je trouve. Je préférerai qu'on laisse ça ainsi, qu'on comprenne mieux.

#7

Mis à jour par Frédéric Péters il y a presque 6 ans

Ça n'a quand même pas beaucoup de sens, je trouve. Je préférerai qu'on laisse ça ainsi, qu'on comprenne mieux.

Je crois moyennement en cette possibilité de meilleure compréhension. Mais je peux faire un notify_exception(), comme ça on continuera à recevoir les traces, sans que l'usager ne reçoive d'erreur.

#9

Mis à jour par Thomas Noël il y a presque 6 ans

Allez, comme tu insistes, go.

#10

Mis à jour par Frédéric Péters il y a presque 6 ans

  • Statut changé de En cours à Résolu (à déployer)

Merci,

commit a3758491b3749668f9e774ad726922db8dcc4d47
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Mon May 14 23:16:23 2018 +0200

    misc: do not crash on draft suddenly not available (#23826)
#11

Mis à jour par Frédéric Péters il y a plus de 5 ans

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

Formats disponibles : Atom PDF