After the entry of judgment of foreclosure against any tract, the city or town may pay delinquent general taxes or purchase certificates of delinquency for general taxes on the tract or purchase the tract at county tax foreclosure or from the county after foreclosure.
After entry of judgment of foreclosure against any premises the city or town may pay local or special assessments which are delinquent or are about to become delinquent and if the tract has been foreclosed upon for local or special assessments and the time for redemption has not expired, it may redeem it.
No moneys shall be expended for the purposes enumerated in this section except upon enactment by the city or town legislative body of a resolution determining the desirability or necessity of making the expenditure.