Yeah. I remember when they had to replace a Senate candidate just weeks before the election and a judge ruled it was “ in the interest of democracy” or some such bilge.
Lautenberg, New Jersey. He was indicted (and subsequently convicted). it looked like the Dems were doomed to lose a seat, but the judge saved their bacon.