Let Me See If I Have This Right… #2

The stuff Michael Flynn did was not illegal and he broke no law. But in spite of having top-drawer attorneys, he agreed to plead guilty to a felony and the court accepted his plea. Do I have this right?