Andrew Johnson survived by a one-vote margin, but 10 Southern states had no senators at the time, so it might not have been so close if they had all been represented in the Senate. Johnson was a Democrat elected on the Republican ticket in 1864, and it is not surprising that neither party wanted to nominate him in 1868.
Why weren't the Founding Fathers perspicacious enough to specify that no one could serve as President who owned hotels?