diff --git a/authentik/blueprints/v1/tasks.py b/authentik/blueprints/v1/tasks.py index f685d7ef7..2cf355a0d 100644 --- a/authentik/blueprints/v1/tasks.py +++ b/authentik/blueprints/v1/tasks.py @@ -170,5 +170,6 @@ def apply_blueprint(self: MonitoredTask, instance_pk: str): instance.status = BlueprintInstanceStatus.ERROR self.set_status(TaskResult(TaskResultStatus.ERROR).with_error(exc)) finally: - instance.metadata = asdict(importer.blueprint.metadata) + if importer.blueprint.metadata: + instance.metadata = asdict(importer.blueprint.metadata) instance.save()