Projet

Général

Profil

Bug #64573

TypeError: join requires a list of strings (export-spreadsheet, block field + bool field)

Ajouté par Lauréline Guérin il y a environ 2 ans. Mis à jour il y a environ 2 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
26 avril 2022
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

TypeError: join requires a list of strings
  File "wcs/compat.py", line 56, in get
    context = self.get_context_data(**kwargs)
  File "wcs/views.py", line 39, in get_context_data
    body = get_publisher().try_publish(get_request())
  File "quixote/publish.py", line 241, in try_publish
    output = self.root_directory._q_traverse(components)
  File "modules/root.py", line 301, in _q_traverse
    output = Directory._q_traverse(self, path)
  File "quixote/directory.py", line 88, in _q_traverse
    return obj._q_traverse(path)
  File "wcs/backoffice/root.py", line 84, in _q_traverse
    return super()._q_traverse(path)
  File "quixote/directory.py", line 116, in _q_traverse
    return super(AccessControlled, self)._q_traverse(path)
  File "quixote/directory.py", line 88, in _q_traverse
    return obj._q_traverse(path)
  File "wcs/backoffice/management.py", line 162, in _q_traverse
    return super()._q_traverse(path)
  File "quixote/directory.py", line 88, in _q_traverse
    return obj._q_traverse(path)
  File "quixote/directory.py", line 92, in _q_traverse
    return obj()
  File "wcs/backoffice/management.py", line 2306, in export_spreadsheet
    return self.csv()
  File "wcs/backoffice/management.py", line 2344, in csv
    job.execute()
  File "wcs/backoffice/management.py", line 4153, in execute
    return self.create_export(formdef, fields, items, total_count)
  File "wcs/backoffice/management.py", line 4166, in create_export
    csv_output.writerow(tuple(x['value'] for x in self.get_spreadsheet_line(fields, filled)))
  File "wcs/backoffice/management.py", line 4117, in get_spreadsheet_line
    element = data.get_field_view_value(field) or ''
  File "wcs/formdata.py", line 849, in get_field_view_value
    return htmltext(', ').join(get_value(field, d) for d in data.get('data') or [])

contenu de data:

{
    data: [
        {
            bf5dff9a08-8bb2-4c65-a264-a3674e00eae2: '4',
            bf5dff9a08-8bb2-4c65-a264-a3674e00eae2_display: 'XXX',
            bf5dff9a08-8bb2-4c65-a264-a3674e00eae2_structured: {"id":"4","prestataire":"'XXX'","service_instructeur":"'XXX'","text":"'XXX'"},
            bf72b49a30-768f-418d-9cdc-b87104dcc5e7: ["2022","4","26","0","0","0","1","116","-1"],
            bfa93a9006-1368-4b7f-90a5-0bde6e464ca4: False,  # <-- ici
            bfd8fbe223-98a4-4f28-b340-30b07384ff47: ["2022","4","18","0","0","0","0","108","-1"],
            bfee517b03-04e1-4915-99ea-e3acd179d6fe: ["2022","4","26","0","0","0","1","116","-1"],
            bfeeada886-372f-4461-852d-ed541a0041ba: 'XXX'
        }
    ]
}

similaire à #63150 (c'est l'export qui pose pb), mais pour le type bool


Fichiers

Révisions associées

Révision 03d27d18 (diff)
Ajouté par Lauréline Guérin il y a environ 2 ans

backoffice: handle bool in fields block in listing exports (#64573)

Historique

#1

Mis à jour par Lauréline Guérin il y a environ 2 ans

#2

Mis à jour par Lauréline Guérin il y a environ 2 ans

  • Assigné à mis à Lauréline Guérin
#3

Mis à jour par Lauréline Guérin il y a environ 2 ans

  • Description mis à jour (diff)
#4

Mis à jour par Lauréline Guérin il y a environ 2 ans

#5

Mis à jour par Lauréline Guérin il y a environ 2 ans

branche basée sur #63150

#6

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

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

Mis à jour par Lauréline Guérin il y a environ 2 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit 03d27d18173400c5ef5ee73341b93a96930c8a65
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Thu Apr 28 16:18:48 2022 +0200

    backoffice: handle bool in fields block in listing exports (#64573)
#8

Mis à jour par Transition automatique il y a environ 2 ans

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

Mis à jour par Transition automatique il y a presque 2 ans

Automatic expiration

Formats disponibles : Atom PDF