California Sen. Dave Cortese proposed the bill as the state grapples with a shortage of affordable housing.