If any board provides that the principal, interest, or both of any bonds or any portion of the principal, interest, or both shall be payable solely from designated revenue, neither the district nor any officer thereof shall be held for payment otherwise.