No action shall be brought or maintained against any county, city, diking district, or flood control zone district when acting alone or when acting jointly with any other county, city, or flood control zone district under any law, or any of its or their agents, officers, or employees, for any noncontractual acts or omissions of such county or counties, city or cities, diking district or districts, flood control zone district or districts, or any of its or their agents, officers, or employees, relating to the improvement, protection, regulation, and control for flood prevention and navigation purposes of any river or its tributaries and the beds, banks, and waters thereof: PROVIDED, That nothing contained in this section shall apply to or affect any action now pending or begun prior to the passage of this section.