Project

General

Profile

Development #60243

Une champ item peut renvoyer une donnée autre que string pour son champ "text"

Added by Benjamin Dauvergne about 1 year ago. Updated about 1 year ago.

Status:
Fermé
Priority:
Normal
Target version:
-
Start date:
04 January 2022
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:
No

Description

https://sentry.entrouvert.org/entrouvert/publik/issues/53854/

ProgrammingError: operator does not exist: character varying = text[]
LINE 1: ...vd3e942changer_sup_hiera_liste_encad" WHERE label = ARRAY['A...
                                                             ^
HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.

  File "wcs_olap/cmd.py", line 153, in main2
    olap_feeder.feed()
  File "wcs_olap/feeder.py", line 654, in feed
    formdef_feeder.feed()
  File "wcs_olap/feeder.py", line 1254, in feed
    self.do_data_table()
  File "wcs_olap/feeder.py", line 790, in do_data_table
    table_name, enumerate(field.items), comment=comment)
  File "wcs_olap/feeder.py", line 519, in create_labeled_table
    'SELECT * FROM {name} WHERE label = %s', ctx={'name': quote(name)}, vars=(_label,))
  File "wcs_olap/feeder.py", line 344, in ex
    self.cur.execute(sql, vars=vars)

Ça vient de ce formulaire https://demarches-essonne.test.entrouvert.org/backoffice/forms/187/ où le troisième champ nommé "Nom de votre supérieur hiérarchique" est un champ item en autocomplétion vers une source de donnée qui renvoie visiblement des choses comme {"text": ["John", "Doe"]}. Je dirai que w.c.s. devrait normaliser les choses de ce coté là, mais en attendant il faut que wcs-olap ne plante pas.


Files


Related issues

Related to w.c.s. - Bug #60244: Des sources de données mal formée sont acceptésFermé04 January 2022

Actions

Associated revisions

Revision 420c724b (diff)
Added by Benjamin Dauvergne about 1 year ago

feeder: ignore non string items (#60243)

History

#1

Updated by Benjamin Dauvergne about 1 year ago

  • Related to Bug #60244: Des sources de données mal formée sont acceptés added
#2

Updated by Benjamin Dauvergne about 1 year ago

  • Description updated (diff)
#3

Updated by Benjamin Dauvergne about 1 year ago

  • Assignee set to Benjamin Dauvergne
#4

Updated by Benjamin Dauvergne about 1 year ago

#5

Updated by Benjamin Dauvergne about 1 year ago

  • Tags set to relecture-facile
#6

Updated by Nicolas Roche about 1 year ago

  • Status changed from Solution proposée to Solution validée

Pas si facile que ça la relecture sans un test.

#7

Updated by Benjamin Dauvergne about 1 year ago

  • Status changed from Solution validée to Résolu (à déployer)
commit 420c724be7043d2d1ae11bcee611a971abb5cd3f
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Fri Jan 7 11:47:26 2022 +0100

    feeder: ignore non string items (#60243)
#8

Updated by Frédéric Péters about 1 year ago

  • Status changed from Résolu (à déployer) to Solution déployée
#9

Updated by Transition automatique 11 months ago

Automatic expiration

Also available in: Atom PDF