Project

General

Profile

Bug #10324

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

Added by Frédéric Péters over 6 years ago. Updated over 6 years ago.

Status:
Fermé
Priority:
Normal
Target version:
Start date:
17 March 2016
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
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>)

Files

Associated revisions

Revision 20f4c0c0 (diff)
Added by Frédéric Péters over 6 years ago

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

This can happen when invalid drafts are restored.

History

#1

Updated by Frédéric Péters over 6 years ago

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

#2

Updated by Frédéric Péters over 6 years ago

#3

Updated by Benjamin Dauvergne over 6 years ago

Ack.

#4

Updated by Frédéric Péters over 6 years ago

  • Status changed from En cours to 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

Updated by Thomas Noël over 6 years ago

  • Target version set to v1.37
#6

Updated by Thomas Noël over 6 years ago

  • Status changed from Résolu (à déployer) to Fermé

Also available in: Atom PDF