The repeal of any statute, or section or sections of any statute, under which an ordinance of any city was passed shall not affect the validity of the ordinance if such ordinance could be passed by the city under the home rule power granted by article 12, section 5, of the constitution of Kansas in the absence of such statute.
K.S.A. 12-3017