They dumped Franken at a convenient time (it signaled a contrast with Trump, and with then-Senate candidate Roy Moore) when there were limited consequences for the party (the Democratic Governor replaced him with a qualified woman who could be expected to have a standard Democratic voting record.)
It was a political calculation, which means it's not integrity over partisanship. It might've made the difference in the Alabama Senate race.