§ 478. Termination of surety's liability. Whenever the liability on an undertaking has ceased, the court shall make an order to that effect. Upon receipt of a certified copy of the order, the county clerk shall discharge of record the lien of the undertaking.