providers/oauth2: fix migration (#12138) Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: Jens L. <jens@goauthentik.io>
This commit is contained in:
committed by
GitHub
parent
5dab92f0d1
commit
f563a0eb36
@ -1,4 +1,5 @@
|
|||||||
# Generated by Django 5.0.9 on 2024-11-04 12:56
|
# Generated by Django 5.0.9 on 2024-11-04 12:56
|
||||||
|
from dataclasses import asdict
|
||||||
from django.apps.registry import Apps
|
from django.apps.registry import Apps
|
||||||
|
|
||||||
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
|
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
|
||||||
@ -18,8 +19,8 @@ def migrate_redirect_uris(apps: Apps, schema_editor: BaseDatabaseSchemaEditor):
|
|||||||
mode = RedirectURIMatchingMode.STRICT
|
mode = RedirectURIMatchingMode.STRICT
|
||||||
if old == "*" or old == ".*":
|
if old == "*" or old == ".*":
|
||||||
mode = RedirectURIMatchingMode.REGEX
|
mode = RedirectURIMatchingMode.REGEX
|
||||||
uris.append(RedirectURI(mode, url=old))
|
uris.append(asdict(RedirectURI(mode, url=old)))
|
||||||
provider.redirect_uris = uris
|
provider._redirect_uris = uris
|
||||||
provider.save()
|
provider.save()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user