From aea0958f3f27484965561d455011fd105899e5a9 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 16 Aug 2022 17:51:22 +0200 Subject: [PATCH] blueprints: add default status Signed-off-by: Jens Langhammer --- authentik/blueprints/migrations/0001_initial.py | 3 ++- authentik/blueprints/models.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/authentik/blueprints/migrations/0001_initial.py b/authentik/blueprints/migrations/0001_initial.py index 81502e660..d017100ee 100644 --- a/authentik/blueprints/migrations/0001_initial.py +++ b/authentik/blueprints/migrations/0001_initial.py @@ -113,7 +113,8 @@ class Migration(migrations.Migration): ("error", "Error"), ("orphaned", "Orphaned"), ("unknown", "Unknown"), - ] + ], + default="unknown", ), ), ("enabled", models.BooleanField(default=True)), diff --git a/authentik/blueprints/models.py b/authentik/blueprints/models.py index e76e51c29..59da385f3 100644 --- a/authentik/blueprints/models.py +++ b/authentik/blueprints/models.py @@ -54,7 +54,9 @@ class BlueprintInstance(SerializerModel, ManagedModel, CreatedUpdatedModel): context = models.JSONField(default=dict) last_applied = models.DateTimeField(auto_now=True) last_applied_hash = models.TextField() - status = models.TextField(choices=BlueprintInstanceStatus.choices) + status = models.TextField( + choices=BlueprintInstanceStatus.choices, default=BlueprintInstanceStatus.UNKNOWN + ) enabled = models.BooleanField(default=True) managed_models = ArrayField(models.TextField(), default=list)