From 0cfffa28adb171246bb2395f8014806e4b065009 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 18 Aug 2022 17:27:11 +0200 Subject: [PATCH] blueprints: fix exporter not ignoring non-SerializerModel objects Signed-off-by: Jens Langhammer --- authentik/blueprints/v1/exporter.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/authentik/blueprints/v1/exporter.py b/authentik/blueprints/v1/exporter.py index 9129bdba2..9416a78ab 100644 --- a/authentik/blueprints/v1/exporter.py +++ b/authentik/blueprints/v1/exporter.py @@ -17,6 +17,7 @@ from authentik.blueprints.v1.common import ( from authentik.blueprints.v1.importer import is_model_allowed from authentik.blueprints.v1.labels import LABEL_AUTHENTIK_GENERATED from authentik.flows.models import Flow, FlowStageBinding, Stage +from authentik.lib.models import SerializerModel from authentik.policies.models import Policy, PolicyBinding from authentik.stages.prompt.models import PromptStage @@ -36,6 +37,8 @@ class Exporter: continue if model in self.excluded_models: continue + if SerializerModel not in model.__mro__: + continue for obj in model.objects.all(): yield BlueprintEntry.from_model(obj)