diff --git a/authentik/core/migrations/0021_alter_application_slug.py b/authentik/core/migrations/0021_alter_application_slug.py new file mode 100644 index 000000000..7ef52e7d2 --- /dev/null +++ b/authentik/core/migrations/0021_alter_application_slug.py @@ -0,0 +1,20 @@ +# Generated by Django 3.2.3 on 2021-05-14 08:48 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("authentik_core", "0020_source_user_matching_mode"), + ] + + operations = [ + migrations.AlterField( + model_name="application", + name="slug", + field=models.SlugField( + help_text="Internal application name, used in URLs.", unique=True + ), + ), + ] diff --git a/authentik/core/models.py b/authentik/core/models.py index 9e0ea3ed5..741f25cfa 100644 --- a/authentik/core/models.py +++ b/authentik/core/models.py @@ -207,7 +207,9 @@ class Application(PolicyBindingModel): add custom fields and other properties""" name = models.TextField(help_text=_("Application's display Name.")) - slug = models.SlugField(help_text=_("Internal application name, used in URLs.")) + slug = models.SlugField( + help_text=_("Internal application name, used in URLs."), unique=True + ) provider = models.OneToOneField( "Provider", null=True, blank=True, default=None, on_delete=models.SET_DEFAULT )