Project

General

Profile

Development #65553

saml, TypeError: Model instances without primary key value are unhashable

Added by Sentry Io over 2 years ago. Updated 22 days ago.

Status:
Solution déployée
Priority:
Normal
Category:
-
Target version:
-
Start date:
23 May 2022
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:
No

Description

https://sentry.entrouvert.org/entrouvert/publik/issues/60291/

TypeError: Model instances without primary key value are unhashable
(15 additional frame(s) were not displayed)
...
  File "django/db/transaction.py", line 284, in __exit__
    connection.set_autocommit(True)
  File "django/db/backends/base/base.py", line 410, in set_autocommit
    self.run_and_clear_commit_hooks()
  File "django/db/backends/base/base.py", line 636, in run_and_clear_commit_hooks
    func()
  File "hobo/agent/authentic2/provisionning.py", line 96, in callback
    self.saved.setdefault(klass, set()).add(instance)
  File "django/db/models/base.py", line 536, in __hash__
    raise TypeError("Model instances without primary key value are unhashable")

Files


Related issues

Has duplicate Hobo - Bug #79483: erreur provisionning SSO SAML (TypeError: Model instances without primary key value are unhashable)Fermé06 July 2023

Actions

Associated revisions

Revision d6fcc575 (diff)
Added by Benjamin Dauvergne 22 days ago

agent/authentic2: prevent error if instance is deleted during current transaction (#65553)

History

#1

Updated by Frédéric Péters over 2 years ago

  • Project changed from Suivi des traces to Authentic 2
#2

Updated by Benjamin Dauvergne over 2 years ago

  • Project changed from Authentic 2 to Hobo

La classe provisionning n'est pas assez sioux pour détecter qu'un utilisateur est créé puis supprimé dans la même transaction, de plus l'instance devrait être copiée avant d'être ajouté au set().

#3

Updated by Benjamin Dauvergne over 2 years ago

  • Assignee set to Benjamin Dauvergne
#4

Updated by Benjamin Dauvergne over 2 years ago

#5

Updated by Benjamin Dauvergne about 2 years ago

Rebasé.

#6

Updated by Frédéric Péters about 1 year ago

  • Has duplicate Bug #79483: erreur provisionning SSO SAML (TypeError: Model instances without primary key value are unhashable) added
#9

Updated by Robot Gitea 8 months ago

  • Status changed from Solution proposée to En cours

Benjamin Dauvergne (bdauvergne) a ouvert une pull request sur Gitea concernant cette demande :

#10

Updated by Robot Gitea 8 months ago

  • Status changed from En cours to Solution proposée
#12

Updated by Robot Gitea about 2 months ago

  • Status changed from Solution proposée to En cours

Benjamin Dauvergne (bdauvergne) a commencé à travailler sur une pull request sur Gitea concernant cette demande :

#13

Updated by Robot Gitea about 2 months ago

  • Status changed from En cours to Solution proposée
#14

Updated by Robot Gitea about 1 month ago

  • Status changed from Solution proposée to Solution validée

Serghei Mihai (smihai) a approuvé une pull request sur Gitea concernant cette demande :

#15

Updated by Robot Gitea 22 days ago

  • Status changed from Solution validée to Résolu (à déployer)

Benjamin Dauvergne (bdauvergne) a mergé une pull request sur Gitea concernant cette demande :

#16

Updated by Transition automatique 22 days ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF