Bug #8785
revenir à l'ancien comportemente pour les listes
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
Historique
Mis à jour par Frédéric Péters il y a plus de 8 ans
- Fichier 0001-fields-fix-display-of-item-field-where-no-elements-a.patch 0001-fields-fix-display-of-item-field-where-no-elements-a.patch ajouté
- Statut changé de Nouveau à En cours
- Patch proposed changé de Non à Oui
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.
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:
Mis à jour par Frédéric Péters il y a plus de 8 ans
- Fichier 0001-fields-review-item-field-to-get-back-to-previous-beh.patch 0001-fields-review-item-field-to-get-back-to-previous-beh.patch ajouté
retour au calme.
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
Mis à jour par Frédéric Péters il y a plus de 8 ans
- Fichier 0001-fields-review-item-field-to-get-back-to-previous-beh.patch 0001-fields-review-item-field-to-get-back-to-previous-beh.patch ajouté
Tests exhaustifs
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.
Mis à jour par Frédéric Péters il y a plus de 8 ans
- Statut changé de Résolu (à déployer) à Fermé
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.