This happened in 2012. He became Foreign Secretary in 2016 - more than four years later. As London Mayor, making a bit of an arse of himself in an attempt to promote the London Olympics is perfectly acceptable. Were he to have done it as FS, it would not have been acceptable.