Bug #28229
get_by_natural_key_json ne fixe pas le content_type des GenericForeignKey
Début:
21 novembre 2018
Echéance:
% réalisé:
100%
Temps estimé:
Patch proposed:
Oui
Planning:
Description
Vu sur ce build raté : https://jenkins2.entrouvert.org/job/authentic/236/testReport/junit/tests/test_natural_key/test_natural_key_json/
assert nk == { 'operation': op_nk, 'ou': ou_nk, 'target_ct': target_ct_nk, 'target': target_nk, } > assert permission == Permission.objects.get_by_natural_key_json(nk)
génère cette requête retournant 2 permissions au lieu d'une:
kwargs = {'operation': <Operation: View>, 'ou__isnull': True, 'target_id': 46} clone = <PermissionQueryset [<Permission: View / user>, <Permission: View / organizational unit / Default organizational unit>]> num = 2 def get(self, *args, **kwargs):
Il manque target_ct
dans kwargs.
Fichiers
Révisions associées
Historique
Mis à jour par Benjamin Dauvergne il y a plus de 5 ans
- Fichier 0001-natural_key-fix-ct_field-of-GenericForeignKey-when-l.patch 0001-natural_key-fix-ct_field-of-GenericForeignKey-when-l.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Mis à jour par Emmanuel Cazenave il y a plus de 5 ans
- Statut changé de Solution proposée à Solution validée
Mis à jour par Benjamin Dauvergne il y a plus de 5 ans
- Statut changé de Solution validée à Résolu (à déployer)
- % réalisé changé de 0 à 100
Appliqué par commit authentic2|d8c6ba0976e0c0182a5ebd24abbf0af40bd8aa96.
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
natural_key: fix ct_field of GenericForeignKey when looking for natural keys (fixes #28229)