No ordinance adopted by a city to decrease weight limits shall apply to any vehicle owned, leased, operated or controlled by any licensed contractor while necessarily in use in the construction, maintenance, or repair of a public works project, or by any highway carrier regulated by the Public Utilities Commission while transporting any materials to or from a public works project, when the bids were opened prior to the adoption of the ordinance unless an alternate direct route is provided substantially within and by the city enacting the ordinance.
Ca. Veh. Code § 35716