Cal. Civ. Proc. Code § 580e
(a)
(1) No deficiency shall be owed or collected, and no deficiency judgment shall be requested or rendered for any deficiency upon a note secured solely by a deed of trust or mortgage for a dwelling of not more than four units, in any case in which the trustor or mortgagor sells the dwelling for a sale price less than the remaining amount of the indebtedness outstanding at the time of sale, in accordance with the written consent of the holder of the deed of trust or mortgage, provided that both of the following have occurred:
(d)