From da58796768d54ba5e5372d6138b92dbf53234027 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 9 Sep 2021 13:54:24 +0200 Subject: [PATCH] providers/proxy: fix defaults for old proxy providers (load providers directly) Signed-off-by: Jens Langhammer --- authentik/providers/proxy/migrations/0014_proxy_v2.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/authentik/providers/proxy/migrations/0014_proxy_v2.py b/authentik/providers/proxy/migrations/0014_proxy_v2.py index 18204d24e..f53c66b8f 100644 --- a/authentik/providers/proxy/migrations/0014_proxy_v2.py +++ b/authentik/providers/proxy/migrations/0014_proxy_v2.py @@ -6,10 +6,9 @@ from django.db.backends.base.schema import BaseDatabaseSchemaEditor def migrate_defaults(apps: Apps, schema_editor: BaseDatabaseSchemaEditor): - from authentik.providers.proxy.models import JWTAlgorithms + from authentik.providers.proxy.models import JWTAlgorithms, ProxyProvider db_alias = schema_editor.connection.alias - ProxyProvider = apps.get_model("authentik_providers_proxy", "proxyprovider") for provider in ProxyProvider.objects.using(db_alias).filter(jwt_alg=JWTAlgorithms.RS256): provider.set_oauth_defaults() provider.save()