Fix UnboundLocalError in recorder (#125419)

This commit is contained in:
Erik Montnemery 2024-09-06 17:14:25 +02:00 committed by GitHub
parent 883e33e72a
commit 09989e6184
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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