The repeal of any statute by the legislative assembly, or by the people through an initiated law, does not have the effect of releasing or extinguishing any penalty, fine, liability, or forfeiture incurred under such statute, but as to cases tried before, or subsequent to, the repeal of such statute, it has the effect of extinguishing any jail or prison sentence that may be, or that has been, imposed by reason of said law, unless the repealing act provides expressly that the penalties of imprisonment shall remain in force as to crimes committed in violation of such law prior to its repeal. In other respects, such act shall remain in force only for the purpose of the enforcement of such fine, penalty, or forfeiture.
N.D.C.C. § 1-02-17