diff --git a/src/jobflow_remote/jobs/jobcontroller.py b/src/jobflow_remote/jobs/jobcontroller.py index d9496d72..20ecb09b 100644 --- a/src/jobflow_remote/jobs/jobcontroller.py +++ b/src/jobflow_remote/jobs/jobcontroller.py @@ -727,7 +727,7 @@ def retry_job( ) raise ValueError(f"No Job matching criteria {lock_filter}") state = JobState(doc["state"]) - if state != JobState.REMOTE_ERROR: + if state == JobState.REMOTE_ERROR: previous_state = doc["previous_state"] try: JobState(previous_state)