IMDb has sued California’s Attorney General (and soon to be U.S. senator) Kamala Harris in an effort to overturn a new law that requires the company’s IMDb Pro to remove the ages of actors and others listed on the site if asked by them to do so.

State Assembly Bill No. 1687 was narrowly crafted to apply only to commercial online entertainment employment providers that charge a subscribers fee, as does IMDb Pro. (Online publications such as Deadline Hollywood which can be viewed for free are not subject to the law.)It was signed into law by Gov. Jerry Brown in September and looked to face scrutiny.

“This law unfairly targets IMDb.com (which appears to be the only public site impacted by the law) and forces IMDb to suppress factual information from public view,” said the 15-page complaint (read it here) filed today in U.S. District Court. “Moreover, the factual information being suppressed from IMDb is available from many other sources, not least including Wikipedia, Google, Microsoft (Bing), and Apple (Siri). As such, AB 1687 sets a dangerous and unconstitutional precedent for other general purpose websites and news sources, and should be deeply troubling to all who care about free speech.”

The suit says the law is unconstitutional, calling it “a misguided law that attempts to combat age discrimination in casting through content-based censorship.” It seeks declaratory and injunctive relief and named Harris as the defendant“in her official capacity as representative of the State of California charged with enforcement of AB 1687, including through California's Unfair Competition Law, CAL. BUS. & PROF. CODE 17200 et seq.”

Harris, a Democrat, was elected to the U.S. Senate on Tuesday.

The new law was hailed by SAG-AFTRA as a major advance for working actors. The union pushed the bill as a way to combat age discrimination. Its backing of the bill was referenced in the lawsuit from Los Angeles-based firm Hueston Hennigan LLP but the union was not named as a defendant.