From ebd476be147a4f41a51a7187d175a3e6ab23dda5 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 3 Jan 2022 21:36:14 +0100 Subject: [PATCH] sources/oauth: fix sources not allowing blank values Signed-off-by: Jens Langhammer #2047 --- .../oauth/migrations/0006_oauthsource_additional_scopes.py | 2 +- authentik/sources/oauth/models.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/authentik/sources/oauth/migrations/0006_oauthsource_additional_scopes.py b/authentik/sources/oauth/migrations/0006_oauthsource_additional_scopes.py index 6574716e2..44da4a5aa 100644 --- a/authentik/sources/oauth/migrations/0006_oauthsource_additional_scopes.py +++ b/authentik/sources/oauth/migrations/0006_oauthsource_additional_scopes.py @@ -13,6 +13,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name="oauthsource", name="additional_scopes", - field=models.TextField(default="", verbose_name="Additional Scopes"), + field=models.TextField(default="", blank=True, verbose_name="Additional Scopes"), ), ] diff --git a/authentik/sources/oauth/models.py b/authentik/sources/oauth/models.py index 18d96311c..87958a8a8 100644 --- a/authentik/sources/oauth/models.py +++ b/authentik/sources/oauth/models.py @@ -44,7 +44,9 @@ class OAuthSource(Source): verbose_name=_("Profile URL"), help_text=_("URL used by authentik to get user information."), ) - additional_scopes = models.TextField(default="", verbose_name=_("Additional Scopes")) + additional_scopes = models.TextField( + default="", blank=True, verbose_name=_("Additional Scopes") + ) consumer_key = models.TextField() consumer_secret = models.TextField()