diff --git a/robot-server/robot_server/runs/run_data_manager.py b/robot-server/robot_server/runs/run_data_manager.py index ec9ad7bf130..f111ca07a3f 100644 --- a/robot-server/robot_server/runs/run_data_manager.py +++ b/robot-server/robot_server/runs/run_data_manager.py @@ -569,6 +569,8 @@ def _get_historical_run_last_command(self, run_id: str) -> Optional[CommandPoint command_slice = self._run_store.get_commands_slice( run_id=run_id, cursor=None, length=1, include_fixit_commands=True ) + if not command_slice.commands: + return None command = command_slice.commands[-1] return (