Projet

Général

Profil

Bug #10324

problème quand autre chose qu'un entier dans "éléments classés"

Ajouté par Frédéric Péters il y a environ 8 ans. Mis à jour il y a environ 8 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
Début:
17 mars 2016
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

Exception:
  type = '<type 'exceptions.ValueError'>', value = 'invalid literal for int() with base 10: 'sdfsdf''

Stack trace (most recent call first):
  File "/usr/lib/python2.7/dist-packages/wcs/sql.py", line 902, in _row2obdata
   900                     d = {}
   901                     for data, rank in value:
>  902                         d[data] = int(rank)
   903                     value = d
   904                 elif field.key == 'password':

  locals:
     sql_type = 'text[][]'
     d = {}
     formdef = <FormDef 'Formulaire de Nicolas ' id:2>
     i = 18
     obdata = {'1': 'DALENCONTE'}
     value = [['element 1', 'sdfsdf']]
     field = <wcs.fields.RankedItemsField object at 0x437d490>
     rank = 'sdfsdf'
     cls = <class 'wcs.formdef.Formulaire-De-Nicolas'>
     data = 'element 1'
     row = (19, '9', None, datetime.datetime(2016, 3, 16, 11, 56, 30), 'draft', '0', None, <read-only buffer for 0x3e4a470, size 2, offset 0 at
0x437d630>, '2-19', None, None, ['_submitter'], [], 'XLXZQNWP', False, None, None, 'DALENCONTE', [['element 1', 'sdfsdf']], [['fghfxgh',
'dwfgwdf', 'sfdgdswfg'], ['sdfgsdfg', 'sdfgsdfg', 'sfgsdfg']], '48.522904146763835;7.781471908092498', 'Oui', 'Oui', <read-only buffer for
0x3e4ab70, size 2, offset 0 at 0x437d870>, None, 'Mme', 'Mme', <read-only buffer for 0x3e4ad30, size 2, offset 0 at 0x437d8b0>)

Fichiers

Révisions associées

Révision 20f4c0c0 (diff)
Ajouté par Frédéric Péters il y a environ 8 ans

sql: don't barf on ranked items saved as strings (#10324)

This can happen when invalid drafts are restored.

Historique

#1

Mis à jour par Frédéric Péters il y a environ 8 ans

(j'ai déjà retiré la demande fautive de la db).

#2

Mis à jour par Frédéric Péters il y a environ 8 ans

#3

Mis à jour par Benjamin Dauvergne il y a environ 8 ans

Ack.

#4

Mis à jour par Frédéric Péters il y a environ 8 ans

  • Statut changé de En cours à Résolu (à déployer)
commit 20f4c0c034c8bdd1dfa2ad6fb1c9635d2e622676
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Thu Mar 17 10:05:36 2016 +0100

    sql: don't barf on ranked items saved as strings (#10324)

    This can happen when invalid drafts are restored.
#5

Mis à jour par Thomas Noël il y a environ 8 ans

  • Version cible mis à v1.37
#6

Mis à jour par Thomas Noël il y a environ 8 ans

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

Formats disponibles : Atom PDF