The lease continues after a sale
A sale does not end a tenant's lease or rental agreement. California Civil Code section 821 says the buyer takes the property subject to the lease, with the same rights to collect rent and enforce it. A sale by itself does not set a tenant's move-out date. If possession is part of your situation, tell us and we can talk through the timing.
Read California Civil Code section 821