outposts: fix managed check
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
38dbde191c
commit
8fe38b528b
|
@ -9,6 +9,7 @@ from yaml import safe_dump
|
||||||
|
|
||||||
from authentik import __version__
|
from authentik import __version__
|
||||||
from authentik.outposts.controllers.base import BaseController, ControllerException
|
from authentik.outposts.controllers.base import BaseController, ControllerException
|
||||||
|
from authentik.outposts.managed import MANAGED_OUTPOST
|
||||||
from authentik.outposts.models import DockerServiceConnection, Outpost, ServiceConnectionInvalid
|
from authentik.outposts.models import DockerServiceConnection, Outpost, ServiceConnectionInvalid
|
||||||
|
|
||||||
|
|
||||||
|
@ -102,7 +103,7 @@ class DockerController(BaseController):
|
||||||
|
|
||||||
# pylint: disable=too-many-return-statements
|
# pylint: disable=too-many-return-statements
|
||||||
def up(self):
|
def up(self):
|
||||||
if self.outpost.managed != "":
|
if self.outpost.managed == MANAGED_OUTPOST:
|
||||||
return None
|
return None
|
||||||
try:
|
try:
|
||||||
container, has_been_created = self._get_container()
|
container, has_been_created = self._get_container()
|
||||||
|
@ -167,7 +168,7 @@ class DockerController(BaseController):
|
||||||
raise ControllerException(str(exc)) from exc
|
raise ControllerException(str(exc)) from exc
|
||||||
|
|
||||||
def down(self):
|
def down(self):
|
||||||
if self.outpost.managed != "":
|
if self.outpost.managed != MANAGED_OUTPOST:
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
container, _ = self._get_container()
|
container, _ = self._get_container()
|
||||||
|
|
Reference in New Issue