The high court reversed a decision by a U.S. appeals court that upheld the law .
The high court reversed a decision by a U.S. appeals court that upheld the law .
But a U.S. appeals court in San Francisco disagreed and upheld the law .