Projet

Général

Profil

Bug #8785

revenir à l'ancien comportemente pour les listes

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

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
Début:
27 octobre 2015
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

    def get_options(self):
        if not self.data_source:
>           options = self.items[:]
E           TypeError: 'NoneType' object has no attribute '__getitem__'

Fichiers

Révisions associées

Révision 034633a0 (diff)
Ajouté par Frédéric Péters il y a plus de 8 ans

fields: review item field to get back to previous behaviour (#8785)

In recent commits we tried to handle optional item field with an empty value
prepended to the list of options but while this allows the user to leave
optional fields uncompleted this is not the same behaviour we add.

Return to the previous behaviour. The only way for an item field to be skipped
is now to be displayed as a <select> field with the hint put as the first
element.

Historique

#1

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

#2

Mis à jour par Thomas Noël il y a plus de 8 ans

Le options[0][0] alors que options ça peut être [None,'un','deux] ou [] ?... Mais peut-être pas ici.

#3

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

Non, on est sûr là que les éléments sont des tuples de trois; cf quelques lignes plus bas :

        for object, description, key in options:
#6

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

  • Sujet changé de erreur sur champ liste non complété mais avec une remarque à revenir à l'ancien comportemente pour les listes
#8

Mis à jour par Thomas Noël il y a plus de 8 ans

Ack (après discussions)

#9

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

  • Statut changé de En cours à Résolu (à déployer)
commit 034633a020d793194dc3e6f8bc933d7865b7b822
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Tue Oct 27 14:07:50 2015 +0100

    fields: review item field to get back to previous behaviour (#8785)

    In recent commits we tried to handle optional item field with an empty value
    prepended to the list of options but while this allows the user to leave
    optional fields uncompleted this is not the same behaviour we add.

    Return to the previous behaviour.  The only way for an item field to be skipped
    is now to be displayed as a <select> field with the hint put as the first
    element.
#10

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

  • Version cible mis à v1.19
#11

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

  • Statut changé de Résolu (à déployer) à Fermé

Formats disponibles : Atom PDF