From 09989e6184044782ddf7ecc5f071b7cf4be36d55 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Fri, 6 Sep 2024 17:14:25 +0200 Subject: [PATCH] Fix UnboundLocalError in recorder (#125419) --- homeassistant/components/recorder/migration.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/recorder/migration.py b/homeassistant/components/recorder/migration.py index 4d9978c641b..df7ff5c4fed 100644 --- a/homeassistant/components/recorder/migration.py +++ b/homeassistant/components/recorder/migration.py @@ -2594,6 +2594,7 @@ class EventIDPostMigration(BaseRunTimeMigration): # removing the index is the likely all that needs to happen. all_gone = not result + fk_remove_ok = False if all_gone: # Only drop the index if there are no more event_ids in the states table # ex all NULL