fix(allauth_cas): Registry was removed in recent versions of allauth
This commit is contained in:
parent
77e02f3796
commit
6d76970e36
2 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
from allauth.account.adapter import get_adapter
|
||||
from allauth.socialaccount.adapter import get_adapter
|
||||
from allauth.account.utils import get_next_redirect_url
|
||||
from allauth.socialaccount import providers
|
||||
from django.contrib.auth.signals import user_logged_out
|
||||
|
@ -14,7 +14,7 @@ def cas_account_logout(sender, request, **kwargs):
|
|||
if not provider_id:
|
||||
return
|
||||
|
||||
provider = providers.registry.by_id(provider_id, request)
|
||||
provider = get_adapter(request).get_provider(request, provider_id)
|
||||
|
||||
if not provider.message_suggest_caslogout_on_logout(request):
|
||||
return
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import cas
|
||||
from allauth.account.adapter import get_adapter
|
||||
from allauth.socialaccount.adapter import get_adapter
|
||||
from allauth.account.utils import get_next_redirect_url
|
||||
from allauth.socialaccount import providers
|
||||
from allauth.socialaccount.helpers import (
|
||||
|
@ -56,7 +56,7 @@ class CASAdapter:
|
|||
"""
|
||||
Returns a provider instance for the current request.
|
||||
"""
|
||||
return providers.registry.by_id(self.provider_id, self.request)
|
||||
return get_adapter(self.request).get_provider(self.provider_id)
|
||||
|
||||
def complete_login(self, request, response):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue