Upon final determination of a contest of an election to an office by the court, after the time for appeal thereof specified in K.S.A. 25-1450, and amendments thereto, has expired, or in case of an appeal, upon the final judicial determination of the contest, if the contestant succeeds in the contest, the court may invalidate and revoke any election certificate which has been issued to the contestee, and the secretary of state or county election officer authorized to issue the certificate of election shall issue the certificate to the person the court finds is entitled thereto; except that in cases where the court has found that the contestant prevails in the contest on the grounds provided for in subsection (a), (b), (c) or (e) of K.S.A. 25-1436, and amendments thereto, then the court may order another election for such office to be held within 45 days after the date of such order or may make such other orders as the court deems appropriate. This section shall not apply to any contest of the office of state senator or member of the house of representatives.
K.S.A. 25-1448