Whatever remedies the lessor of any real property has against the lessor's immediate lessee for the breach of an agreement in the lease or for recovery of the possession, the lessor also has against the assignees of the lessee for any claim for relief accruing while they are such assignees, except when the assignment is made by way of security for a loan and is not accompanied by possession of the premises.
N.D.C.C. § 47-16-30