Unless otherwise precluded by statute, the defendant makes a deposit in lieu of an undertaking in an amount specified by the writ to be secured by the attachment, the property shall be released immediately upon receiving the order permitting an undertaking to be substituted for attached property. (CCP 995.710)