Donald Trump will still take office as the first US president with a felony conviction.