But a U.S. appeals court in San Francisco disagreed and upheld the law .