If judgment is given upon the right of and in favor of the person alleged in the complaint to be entitled to the office or franchise, the person may afterwards maintain an action to recover the damages which the person has sustained by reason of the premises.
ORS 30.550