diff --git a/authentik/providers/oauth2/migrations/0024_remove_oauth2provider_redirect_uris_and_more.py b/authentik/providers/oauth2/migrations/0024_remove_oauth2provider_redirect_uris_and_more.py index 0e88ba91c5..6f9dc199f0 100644 --- a/authentik/providers/oauth2/migrations/0024_remove_oauth2provider_redirect_uris_and_more.py +++ b/authentik/providers/oauth2/migrations/0024_remove_oauth2provider_redirect_uris_and_more.py @@ -1,4 +1,5 @@ # Generated by Django 5.0.9 on 2024-11-04 12:56 +from dataclasses import asdict from django.apps.registry import Apps from django.db.backends.base.schema import BaseDatabaseSchemaEditor @@ -18,8 +19,8 @@ def migrate_redirect_uris(apps: Apps, schema_editor: BaseDatabaseSchemaEditor): mode = RedirectURIMatchingMode.STRICT if old == "*" or old == ".*": mode = RedirectURIMatchingMode.REGEX - uris.append(RedirectURI(mode, url=old)) - provider.redirect_uris = uris + uris.append(asdict(RedirectURI(mode, url=old))) + provider._redirect_uris = uris provider.save()