In every case contesting the right to an office, judgment shall be rendered according to the rights of the parties, and for the damages the plaintiff or person entitled may have sustained, if any, to the time of the judgment.
Okla. Stat. tit. 12, § 1534