blueprints: keep more modular state

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-08-18 17:41:53 +02:00
parent 0cfffa28ad
commit 0e9762072a
2 changed files with 17 additions and 9 deletions

View File

@ -21,6 +21,7 @@ from yaml import load
from authentik.blueprints.v1.common import (
Blueprint,
BlueprintEntry,
BlueprintEntryState,
BlueprintLoader,
EntryInvalidError,
)
@ -220,7 +221,7 @@ class Importer:
model = serializer.save()
if "pk" in entry.identifiers:
self.__pk_map[entry.identifiers["pk"]] = model.pk
entry._instance = model
entry._state = BlueprintEntryState(model)
self.logger.debug("updated model", model=model, pk=model.pk)
return True