Project

General

Profile

Bug #79483

erreur provisionning SSO SAML (TypeError: Model instances without primary key value are unhashable)

Added by Sentry Io over 1 year ago. Updated about 1 year ago.

Status:
Fermé
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
06 July 2023
Due date:
% Done:

0%

Estimated time:
Patch proposed:
No
Planning:
No

Description

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

  File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/mellon/views.py", line 242, in post
    return self.sso_success(request, login)
  File "/usr/lib/python3/dist-packages/mellon/views.py", line 299, in sso_success
    response = self.authenticate(request, login, attributes)
  File "/usr/lib/python3/dist-packages/mellon/views.py", line 306, in authenticate
    user = auth.authenticate(
  File "/usr/lib/python3/dist-packages/django/views/decorators/debug.py", line 42, in sensitive_variables_wrapper
    return func(*func_args, **func_kwargs)
  File "/usr/lib/python3/dist-packages/django/contrib/auth/__init__.py", line 76, in authenticate
    user = backend.authenticate(request, **credentials)
  File "/usr/lib/python3/dist-packages/authentic2_auth_saml/backends.py", line 28, in authenticate
    return super().authenticate(request=request, **kwargs)
  File "/usr/lib/python3/dist-packages/mellon/backends.py", line 46, in authenticate
    user = adapter.lookup_user(idp, saml_attributes)
  File "/usr/lib/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/usr/lib/python3/dist-packages/django/db/transaction.py", line 290, in __exit__
    connection.set_autocommit(True)
  File "/usr/lib/python3/dist-packages/django/db/backends/base/base.py", line 420, in set_autocommit
    self.run_and_clear_commit_hooks()
  File "/usr/lib/python3/dist-packages/django/db/backends/base/base.py", line 653, in run_and_clear_commit_hooks
    func()
  File "/usr/lib/python3/dist-packages/hobo/agent/authentic2/provisionning.py", line 93, in callback
    self.saved.setdefault(klass, set()).add(instance)
  File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 538, in __hash__
    raise TypeError("Model instances without primary key value are unhashable")

Exception Type: TypeError at /accounts/saml/login/
Exception Value: Model instances without primary key value are unhashable

Related issues

Is duplicate of Hobo - Development #65553: saml, TypeError: Model instances without primary key value are unhashableSolution déployée23 May 2022

Actions

History

#1

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

  • Project changed from Suivi des traces to Hobo

(hobo, ou django-mellon, ou authentic, à voir)

#2

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

  • Status changed from Nouveau to Fermé

doublon #65553.

#3

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

  • Is duplicate of Development #65553: saml, TypeError: Model instances without primary key value are unhashable added

Also available in: Atom PDF