Avoid injecting empty dicts into repo_config

This commit is contained in:
deajan 2025-06-13 17:46:13 +02:00
parent ce8fbb7bf3
commit a9696b46a1

View file

@ -747,12 +747,14 @@ def get_repo_config(
# Merge prometheus global settings with repo settings # Merge prometheus global settings with repo settings
try: try:
repo_config.s("global_email", deepcopy(full_config.g("global_email"))) if full_config.g("global_email"):
repo_config.s("global_email", deepcopy(full_config.g("global_email")))
except KeyError: except KeyError:
logger.info("No global email settings found") logger.info("No global email settings found")
try: try:
repo_config.s("global_prometheus", deepcopy(full_config.g("global_prometheus"))) if full_config.g("global_prometheus"):
repo_config.s("global_prometheus", deepcopy(full_config.g("global_prometheus")))
except KeyError: except KeyError:
logger.info("No global prometheus settings found") logger.info("No global prometheus settings found")