From 613c46eb67a847391fc89c81b9b4068e3242916e Mon Sep 17 00:00:00 2001 From: FrogAi <91348155+FrogAi@users.noreply.github.com> Date: Fri, 20 Dec 2024 05:09:18 -0700 Subject: [PATCH] update --- selfdrive/frogpilot/frogpilot_variables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/frogpilot/frogpilot_variables.py b/selfdrive/frogpilot/frogpilot_variables.py index cf1bd460cab8ff..ee71c4aa04ea6c 100644 --- a/selfdrive/frogpilot/frogpilot_variables.py +++ b/selfdrive/frogpilot/frogpilot_variables.py @@ -581,7 +581,7 @@ def update(self, holiday_theme, started): toggle.model_randomizer = params.get_bool("ModelRandomizer") if tuning_level >= level["ModelRandomizer"] else default.get_bool("ModelRandomizer") if available_models: if toggle.model_randomizer: - if not started or not toggle.model: + if not started or not hasattr(toggle, "model"): blacklisted_models = (params.get("BlacklistedModels", encoding='utf-8') or "").split(",") existing_models = [model for model in available_models.split(",") if model not in blacklisted_models and (MODELS_PATH / f"{model}.thneed").exists()] toggle.model = random.choice(existing_models) if existing_models else default.get("Model", encoding='utf-8')