PN, in 1980 I knew one Officer who went one better.
When they told him he needed to be elected to get out he decided to enter the election as the Gay Lib candidate using his Sqn Ldr rank.
They let him out straight away.
He was arampant heterosexual, by the way.