outpost: add fallback for authentik_host when its not set in config

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-08-08 16:32:12 +02:00
parent 8180d6f9e8
commit 2a53bc4330
1 changed files with 4 additions and 0 deletions

View File

@ -312,6 +312,10 @@ class Outpost(ManagedModel):
@property
def config(self) -> OutpostConfig:
"""Load config as OutpostConfig object"""
# When embedded outpost is generated initially, this field isn't set
# (on purpose, as we don't want it to be managed by us)
if "authentik_host" not in self._config:
self._config["authentik_host"] = ""
return from_dict(OutpostConfig, self._config)
@config.setter