From ef4876239dfe9ff14d75ff2b57736ea5e617ade7 Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Fri, 9 May 2025 15:16:08 +0200 Subject: [PATCH] account for 285 --- infra/operator/main.tf | 4 ++-- panel/src/panel/views.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/infra/operator/main.tf b/infra/operator/main.tf index aa631078..1054ba78 100644 --- a/infra/operator/main.tf +++ b/infra/operator/main.tf @@ -23,7 +23,7 @@ locals { hostname = inst cfg = { # enable if any user applications are enabled - enable = anytrue([for _, app in local.application_configs: app.cfg.enable]) + enable = anytrue([for _, app in local.application_configs: try(app.cfg.enable, false)]) } } } @@ -70,5 +70,5 @@ module "nixos" { ]; } EOF - }) if inst.cfg.enable} + }) if try(inst.cfg.enable, false)} } diff --git a/panel/src/panel/views.py b/panel/src/panel/views.py index 2f1abb37..d168a3a1 100644 --- a/panel/src/panel/views.py +++ b/panel/src/panel/views.py @@ -115,7 +115,7 @@ class DeploymentStatus(ConfigurationForm): } | { # pass in form info to our deployment # FIXME: ensure sensitive info is protected - f"TF_VAR_{k}": v if isinstance(v, str) else json.dumps(v) for k, v in config.json().items() + f"TF_VAR_{k}": v if isinstance(v, str) else json.dumps(v) for k, v in json.loads(config.model_dump_json()).items() } logger.info("env: %s", env) cwd = f"{settings.repo_dir}/infra/operator"