ยง 2512. Undertaking by the state, municipal corporation or public officer. 1. Any provision of law authorizing or requiring an undertaking to be given by a party shall be construed as excluding the state, a domestic municipal corporation or a public officer in behalf of the state or of such a corporation. Such parties shall, however, be liable for damages as provided in such provision of law in an amount not exceeding an amount which shall be fixed by the court whenever it would require an undertaking of a private party. 2. Where an appeal is taken by any such party, only the court to which the appeal is taken may fix the amount which shall limit the liability for damages pursuant to this section.