Skip to content

Commit

Permalink
providers/oauth2: fix migration (cherry-pick #12138) (#12140)
Browse files Browse the repository at this point in the history
providers/oauth2: fix migration (#12138)

Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens L. <[email protected]>
  • Loading branch information
gcp-cherry-pick-bot[bot] and BeryJu authored Nov 21, 2024
1 parent 5dab92f commit f563a0e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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()


Expand Down

0 comments on commit f563a0e

Please sign in to comment.