Project

General

Profile

Development #65553

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

Added by Sentry Io 8 months ago. Updated 7 months ago.

Status:
Solution proposé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

History

#1

Updated by Frédéric Péters 8 months ago

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

Updated by Benjamin Dauvergne 8 months 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 8 months ago

  • Assignee set to Benjamin Dauvergne
#4

Updated by Benjamin Dauvergne 8 months ago

#5

Updated by Benjamin Dauvergne 7 months ago

Rebasé.

Also available in: Atom PDF