From ddfc943bba793e04b7046d8aa2141f5903ac2509 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 13 Jun 2021 13:32:18 +0200 Subject: [PATCH] root: fix build_hash being set incorrectly for tagged versions Signed-off-by: Jens Langhammer --- authentik/root/settings.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/authentik/root/settings.py b/authentik/root/settings.py index 5685f83c2..61393826d 100644 --- a/authentik/root/settings.py +++ b/authentik/root/settings.py @@ -375,7 +375,11 @@ if _ERROR_REPORTING: environment=CONFIG.y("error_reporting.environment", "customer"), send_default_pii=CONFIG.y_bool("error_reporting.send_pii", False), ) - set_tag("authentik.build_hash", os.environ.get(ENV_GIT_HASH_KEY, "tagged")) + # Default to empty string as that is what docker has + build_hash = os.environ.get(ENV_GIT_HASH_KEY, "") + if build_hash == "": + build_hash = "tagged" + set_tag("authentik.build_hash", build_hash) set_tag( "authentik.env", "kubernetes" if "KUBERNETES_PORT" in os.environ else "compose" )