Except as provided by § 21-47-16, a foreclosure by action of a mortgage upon real estate operates as a complete extinguishment, satisfaction and payment of the debt secured by the mortgage. However, a foreclosure may not be considered to be satisfaction of an assignment of rents agreement under the mortgage.
SDCL 21-47-17