Upon the foreclosure of any mortgage, executed to any vendor of real property or to the vendor's heirs, executors, administrators, or assigns for the balance of the purchase price of the real property, the mortgagee is not entitled to a deficiency judgment on account of the mortgage or note or obligation secured by the mortgage.
§ 71-1-232, MCA