Projet

Général

Profil

Bug #42613

workflow externe: erreur lors de la recherche des données liées

Ajouté par Serghei Mihai (congés, retour 15/05) il y a environ 4 ans. Mis à jour il y a environ 4 ans.

Statut:
Fermé
Priorité:
Normal
Version cible:
-
Début:
07 mai 2020
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

Trace en recette:

## Démo ##

Exception:
  type = '<class 'AttributeError'>', value = ''EmailField' object has no attribute 'data_source''

Stack trace (most recent call first):
  File "/usr/lib/python3/dist-packages/wcs/wf/external_workflow.py", line 117, in iter_target_datas
   115         # search linked objects in data sources
   116         for field in formdata.get_formdef().get_all_fields():
>  117             if field.data_source and field.data_source['type'] == self.slug:  
   118                 data_ids.append(formdata.data.get(field.id))
   119 

  locals: 
     data_ids = []
     field = <EmailField 1 'email'>
     formdata = <Test-Creation-Et-Update-Fiche 'Test création et update fiche - n°15-3' id:3>
     objectdef = <CardDef 'Test' id:2>
     self = <ExternalWorkflowGlobalAction 1>

Fichiers

Révisions associées

Révision 6b69a5a1 (diff)
Ajouté par Serghei Mihai (congés, retour 15/05) il y a environ 4 ans

external_workflow: check that field data source exists (#42613)

Historique

#1

Mis à jour par Serghei Mihai (congés, retour 15/05) il y a environ 4 ans

#2

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

Ce n'est pas plutôt un getattr(..., None) que tu veux faire ?

#3

Mis à jour par Mikaël Ates il y a environ 4 ans

Je rencontre ça :

Exception:
  type = '<class 'AttributeError'>', value = ''PageField' object has no attribute 'data_source''

Stack trace (most recent call first):
  File "/usr/lib/python3/dist-packages/wcs/wf/external_workflow.py", line 117, in iter_target_datas
   115         # search linked objects in data sources
   116         for field in formdata.get_formdef().get_all_fields():
>  117             if field.data_source and field.data_source['type'] == self.slug:
   118                 data_ids.append(formdata.data.get(field.id))
   119 

  locals: 
     data_ids = []
     field = <PageField 21 "Choix du type d'événement">
     formdata = <Inscription-V2 'Inscription - n°125-302' id:302>
     objectdef = <CardDef 'Seniors - Quotas sur événements' id:5>
     self = <ExternalWorkflowGlobalAction 4>

C'est rentre dans le périmètre de ce ticket ?

#4

Mis à jour par Serghei Mihai (congés, retour 15/05) il y a environ 4 ans

Oui, Mike.

#6

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

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

Mis à jour par Serghei Mihai (congés, retour 15/05) il y a environ 4 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit 6b69a5a1b6ce3798bf01149a8d5da55cf025884f (origin/wip/42613-check-data-source-existence, origin/master, origin/HEAD, wip/42613-check-data-source-existence)
Author: Serghei Mihai <smihai@entrouvert.com>
Date:   Thu May 7 11:40:48 2020 +0200

    external_workflow: check that field data source exists (#42613)
#8

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

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

Formats disponibles : Atom PDF