A local California law that barred convicted sex offenders from handing out treats on Halloween was rescinded by the city council on Monday.

KTLA 5 reports the 2012 Simi Valley law had prevented convicted sex offenders on the Megan's Law website from handing out candy to children on Halloween. It also mandated that sex offenders turn their lights off after 5 p.m. on Halloween and prevented them from decorating their homes.

The law had been facing a legal battle, with opponents calling it unconstitutional.

CBS Los Angeles reports there had been two federal lawsuits alleging the law is unconstitutional and the city council repealed the law by claiming it could not hold up in court.

The most recent lawsuit, filed on Sept. 18, will be dismissed as a result of the law being rescinded.

According to KTLA 5, the law had previously required sex offenders to put signs outside their homes reading, “No candy or treats at this residence.” After a lawsuit, Simi Valley said they would not enforce that law.

Parents interviewed by CBS Los Angeles opposed the law being repealed.

KTLA 5 claims the city had never enforced the ordinance.

Thank you for supporting MRCTV! As a tax-deductible, charitable organization, we rely on the support of our readers to keep us running! Keep MRCTV going with your gift here!