Projet

Général

Profil

Bug #6883

save_key_values() fails if an authn request is replayed

Ajouté par Benjamin Dauvergne il y a presque 9 ans. Mis à jour il y a presque 9 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
Début:
01 avril 2015
Echéance:
% réalisé:

100%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

When KeyValue(key=..., value...).save() is executed two times with the same key, the second time Django try to write a NULL value in the created field. We should just use get_or_create() to work around that.


Fichiers

Révisions associées

Révision 434e3e6e (diff)
Ajouté par Benjamin Dauvergne il y a presque 9 ans

saml: use get_or_create() in save_key_values (fixes #6883)

With a simple Model.save() the second save in case of replay fails
because the created is updated to the NULL value. It seem that
initialization of DateTime field is ignored when Django detects that a
save is an UPDATE and not an INSERT.

Révision 6491033c (diff)
Ajouté par Benjamin Dauvergne il y a presque 9 ans

saml: use get_or_create() in save_key_values (fixes #6883)

With a simple Model.save() the second save in case of replay fails
because the created is updated to the NULL value. It seem that
initialization of DateTime field is ignored when Django detects that a
save is an UPDATE and not an INSERT.

Historique

#2

Mis à jour par Benjamin Dauvergne il y a presque 9 ans

  • Statut changé de Nouveau à Résolu (à déployer)
  • % réalisé changé de 0 à 100
#3

Mis à jour par Benjamin Dauvergne il y a presque 9 ans

#4

Mis à jour par Benjamin Dauvergne il y a presque 9 ans

  • Version cible changé de 2.2.0 à 2.1.14
#5

Mis à jour par Benjamin Dauvergne il y a presque 9 ans

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

Formats disponibles : Atom PDF