diff --git a/authentik/outposts/controllers/base.py b/authentik/outposts/controllers/base.py index 3e1bbab23..383a11964 100644 --- a/authentik/outposts/controllers/base.py +++ b/authentik/outposts/controllers/base.py @@ -86,7 +86,8 @@ class BaseController: def __exit__(self, exc_type, exc_value, traceback): """Cleanup after usage""" - self.client.__exit__(exc_type, exc_value, traceback) + if hasattr(self, "client"): + self.client.__exit__(exc_type, exc_value, traceback) def get_static_deployment(self) -> str: """Return a static deployment configuration"""