Whenever the department enters into a contract for the construction of a highway, it shall, as a condition of the contract, provide that the contractor shall place suitable warning signs that can be read from a distance of 100 feet in daytime, and that the contractor shall erect and place at night a red and white lantern or a torch or other effective device, of a type approved by the department, at both ends of the construction work, not less than 300 feet from it, warning the public that the road is under construction or improvement and is closed, impassable, or dangerous for travel. This section does not make the state liable for the failure of a contractor to erect warning signs.