Projet

Général

Profil

Bug #75095

afterjob de tests, erreur sur source de données json pas de session

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

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
03 mars 2023
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Non
Planning:
Non

Description

Exception:
  type = '<class 'AttributeError'>', value = ''NoneType' object has no attribute 'id''

Stack trace (most recent call first):
  File "/usr/lib/python3/dist-packages/wcs/data_sources.py", line 869, in get_jsonp_url
   867 
   868         if token_context:
>  869             token_context['session_id'] = get_session().id
   870             token, dummy = get_publisher().token_class.get_or_create(
   871                 type='autocomplete', context=token_context

  locals: 
     kwargs = {}
     parts = ['carddef', 'pcros']
     self = <NamedDataSource None id:None>
     token_context = {'carddef_ref': 'carddef:pcros'}

  File "/usr/lib/python3/dist-packages/wcs/fields.py", line 2316, in perform_more_widget_changes
  2314                 kwargs['edit_related'] = True
  2315                 url_kwargs['edit_related'] = True
> 2316             self.url = kwargs['url'] = data_source.get_jsonp_url(**url_kwargs)
  2317             self.widget_class = JsonpSingleSelectWidget
  2318             return

  locals: 
     carddef = <CardDef 'pcros fiche' id:12>
     data_source = <NamedDataSource None id:None>
     display_mode = 'autocomplete'
     edit = True
     form = <wcs.qommon.form.Form object at 0x7f55d3a9d160>
     kwargs = {'required': True, 'render_br': False}
     self = <ItemField 52 'Liste fiche'>
     url_kwargs = {}

  File "/usr/lib/python3/dist-packages/wcs/fields.py", line 887, in add_to_form
   885             if hasattr(self, k):
   886                 kwargs[k] = getattr(self, k)
>  887         self.perform_more_widget_changes(form, kwargs)
   888         if self.hint and self.hint.startswith('<'):
   889             hint = htmltext(get_publisher().translate(self.hint))

  locals: 
     form = <wcs.qommon.form.Form object at 0x7f55d3a9d160>
     kwargs = {'required': True, 'render_br': False}
     self = <ItemField 52 'Liste fiche'>
     value = None

  File "/usr/lib/python3/dist-packages/wcs/testdef.py", line 224, in run_widget_validation
   222 
   223     def run_widget_validation(self, field, value):
>  224         widget = field.add_to_form(self.form)
   225         widget.set_value(value)
   226         widget.transfer_form_value(get_publisher().get_request())

  locals: 
     field = <ItemField 52 'Liste fiche'>
     self = <wcs.testdef.TestDef object at 0x7f55d3a9d190>
     value = None

C'est peut-être parce qu'il manque encore des validations sur des tickets sur les tests, ou pas, dans le doute j'ai quand même créé ce ticket.

Révisions associées

Révision c2ea6847 (diff)
Ajouté par Valentin Deniaud il y a environ un an

testdef: never call field data source (#75095)

Historique

#1

Mis à jour par Robot Gitea il y a environ un an

  • Statut changé de Nouveau à Solution proposée

Valentin Deniaud (vdeniaud) a ouvert une pull request sur Gitea concernant cette demande :

#2

Mis à jour par Robot Gitea il y a environ un an

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

Lauréline Guérin (lguerin) a approuvé une pull request sur Gitea concernant cette demande :

#3

Mis à jour par Robot Gitea il y a environ un an

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

Valentin Deniaud (vdeniaud) a mergé une pull request sur Gitea concernant cette demande :

#4

Mis à jour par Transition automatique il y a environ un an

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

Mis à jour par Transition automatique il y a 12 mois

Automatic expiration

Formats disponibles : Atom PDF