From 835a9aaaf2aa6ee649270cd899efdf380b244344 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 16 Dec 2020 00:00:36 +0100 Subject: [PATCH] outposts: fix circular import --- authentik/outposts/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/authentik/outposts/models.py b/authentik/outposts/models.py index 56077bba8..a301bb892 100644 --- a/authentik/outposts/models.py +++ b/authentik/outposts/models.py @@ -35,7 +35,6 @@ from authentik.lib.models import InheritanceForeignKey from authentik.lib.sentry import SentryIgnoredException from authentik.lib.utils.template import render_to_string from authentik.outposts.docker_tls import DockerInlineTLS -from authentik.outposts.tasks import outpost_service_connection_state OUR_VERSION = parse(__version__) OUTPOST_HELLO_INTERVAL = 10 @@ -122,6 +121,8 @@ class OutpostServiceConnection(models.Model): @property def state(self) -> OutpostServiceConnectionState: """Get state of service connection""" + from authentik.outposts.tasks import outpost_service_connection_state + state = cache.get(self.state_key, None) if not state: outpost_service_connection_state.delay(self.pk)