Projet

Général

Profil

Bug #22751

authentic2: corrige hobo-deploy quand un attribut est réellement désactivé

Ajouté par Benjamin Dauvergne il y a environ 6 ans. Mis à jour il y a plus de 5 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
-
Début:
22 mars 2018
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

Les attributs désactivés sont invisibles via le gestionnaire Attribute.objects. il faut utiliser Attribute.all_objects. à la place.


Fichiers


Demandes liées

Lié à Hobo - Bug #11017: ne pas avoir du tout dans authentic les champs de profil désactivésRejeté22 mai 2016

Actions

Révisions associées

Révision 79da1603 (diff)
Ajouté par Benjamin Dauvergne il y a environ 6 ans

agent/authentic2: use Attribute.disabled field to disable an attribute (#22751)

Révision 411e9436 (diff)
Ajouté par Benjamin Dauvergne il y a environ 6 ans

agent/authentic2: fix provisionning of attributes when an attribute is disabled (#22751)

Attribute.objects.get_or_create() can fail on an existing attribute as
the default "objects" manager of the Attribute model hide disabled
attributes, so the get() can fail but won't be able to create the
attribute.

Révision 661fd751 (diff)
Ajouté par Frédéric Péters il y a environ 6 ans

tests: use Attribute.all_objects to get all fields (#22751)

Historique

#2

Mis à jour par Benjamin Dauvergne il y a environ 6 ans

  • Patch proposed changé de Non à Oui
#3

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

Ça répond en fait à #11017, correct ?

#4

Mis à jour par Benjamin Dauvergne il y a environ 6 ans

Oui, mais bon là je suis tombé sur un vrai bug lié à ça.

#5

Mis à jour par Benjamin Dauvergne il y a environ 6 ans

  • Sujet changé de authentic2: corrige hobo-deploy quand un attribute est réllement désactivé à authentic2: corrige hobo-deploy quand un attribut est réellement désactivé
#6

Mis à jour par Benjamin Dauvergne il y a environ 6 ans

  • Lié à Bug #11017: ne pas avoir du tout dans authentic les champs de profil désactivés ajouté
#7

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

0002 n'avait pas de quoi réactiver un attribut désactivé.

Mais tant qu'à utiliser l'attribut disabled d'authentic, autant y aller tout à fait, plus besoin de changer les autres paramètres, il me semble. (patch modifié attaché)

(cela étant, toucher à .objects, je trouve que ça donne un résultat plutôt violent côté /admin/ d'authentic)

#8

Mis à jour par Benjamin Dauvergne il y a environ 6 ans

Ack, tu as raison pour authentic, #22893.

#9

Mis à jour par Benjamin Dauvergne il y a environ 6 ans

  • Statut changé de En cours à Résolu (à déployer)
commit 79da1603bd6371ee003e136601a7e5d50b34e516
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Thu Mar 22 22:15:06 2018 +0100

    agent/authentic2: use Attribute.disabled field to disable an attribute (#22751)

#10

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

Il manque ton 0001-agent-authentic2-fix-provisionning-of-attributes-whe.patch.

#11

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

Et une correction aux tests pour également utiliser all_objects.

commit 661fd751a642e6e09fa756abe83380d304be3072
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Thu Mar 29 15:47:50 2018 +0200

    tests: use Attribute.all_objects to get all fields (#22751)

commit 411e94363abf2289ab6b62ab2eafaf871d32e9ac
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Thu Mar 22 22:12:50 2018 +0100

    agent/authentic2: fix provisionning of attributes when an attribute is disabled (#22751)

    Attribute.objects.get_or_create() can fail on an existing attribute as
    the default "objects" manager of the Attribute model hide disabled
    attributes, so the get() can fail but won't be able to create the
    attribute.
#12

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

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

Formats disponibles : Atom PDF