Projet

Général

Profil

Bug #48568

'NoneType' object has no attribute 'get_filter'

Ajouté par Frédéric Péters il y a plus de 3 ans. Mis à jour il y a plus de 3 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
16 novembre 2020
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

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

Stack trace (most recent call first):
  File "/usr/lib/python3/dist-packages/wcs/carddef.py", line 178, in get_data_source_criterias
   176         criterias = form_page.get_view_criterias()
   177
>  178         selected_filter = custom_view.get_filter()
   179         if selected_filter and selected_filter != 'all':
   180             if selected_filter == 'pending':

  locals:
     FormPage = <class 'wcs.backoffice.management.FormPage'>
     carddef = <CardDef 'CP et communes' id:9>
     cls = <class 'wcs.carddef.CardDef'>
     criterias = []
     custom_view = None
     form_page = <wcs.backoffice.management.FormPage object at 0x7f3f7c617198>

  File "/usr/lib/python3/dist-packages/wcs/carddef.py", line 264, in get_data_source_referenced_varnames
   262         varnames = []
   263         from .fields import Field
>  264         for criteria in cls.get_data_source_criterias(carddef, custom_view):
   265             if not isinstance(criteria.value, str):
   266                 continue

  locals:
     Field = <class 'wcs.fields.Field'>
     carddef = <CardDef 'CP et communes' id:9>
     cls = <class 'wcs.carddef.CardDef'>
     custom_view = None
     data_source_id = 'carddef:cp-et-communes:liste-cp'
     formdef = <FormDef 'Carole-conditions' id:173>
     parts = ['carddef', 'cp-et-communes', 'liste-cp']
     varnames = []
...

Fichiers

Révisions associées

Révision 4eed2bc5 (diff)
Ajouté par Frédéric Péters il y a plus de 3 ans

cards: return empty list if data source custom view has been removed (#48568)

Historique

#1

Mis à jour par Frédéric Péters il y a plus de 3 ans

La vue en question a été supprimée.

#2

Mis à jour par Frédéric Péters il y a plus de 3 ans

#3

Mis à jour par Lauréline Guérin il y a plus de 3 ans

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

Mis à jour par Frédéric Péters il y a plus de 3 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit 4eed2bc5c5bc75cbef2ac98d3f0c76276d73ca0c
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Mon Nov 16 10:26:12 2020 +0100

    cards: return empty list if data source custom view has been removed (#48568)
#5

Mis à jour par Frédéric Péters il y a plus de 3 ans

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

Formats disponibles : Atom PDF