From 4202ddbe4be160fd97a1203cd52341319877e09f Mon Sep 17 00:00:00 2001 From: John Bodley <4567245+john-bodley@users.noreply.github.com> Date: Wed, 17 May 2023 15:35:05 -0700 Subject: [PATCH] cho --- superset/reports/commands/execute.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/superset/reports/commands/execute.py b/superset/reports/commands/execute.py index 78ac8aa3a88f8..5ca94ff5db496 100644 --- a/superset/reports/commands/execute.py +++ b/superset/reports/commands/execute.py @@ -671,7 +671,6 @@ def __init__( self._scheduled_dttm = scheduled_dttm def run(self) -> None: - state_found = False for state_cls in self.states_cls: if (self._report_schedule.last_state is None and state_cls.initial) or ( self._report_schedule.last_state in state_cls.current_states @@ -682,9 +681,8 @@ def run(self) -> None: self._scheduled_dttm, self._execution_id, ).next() - state_found = True break - if not state_found: + else: raise ReportScheduleStateNotFoundError()