On 12/7/23 14:33, Jered Floyd wrote:
FYI, The django-allauth author has proposed fixing both of these with an even simpler change, which is now upstream and queued for a future release.
--Jered
Thank you again for your work on this. I can confirm that the patch below fixes my issue with https://msapiro.net/accounts/social/connections/ and SITE_ID = 0.
--- a/allauth/socialaccount/adapter.py +++ b/allauth/socialaccount/adapter.py @@ -228,7 +228,10 @@ class DefaultSocialAccountAdapter(object): provider_to_apps = {}
# First, populate it with the DB backed apps. - db_apps = SocialApp.objects.on_site(request) + if request: + db_apps = SocialApp.objects.on_site(request) + else: + db_apps = SocialApp.objects.all() if provider: db_apps = db_apps.filter(Q(provider=provider) | Q(provider_id=provider)) if client_id:
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan