A Canadian County judge on Monday ruled that part of a Yukon city ordinances that governs the use of medical marijuana in the community cannot be enforced.

District Judge Paul Hesse issued an injunction that will prevent the city from requiring individuals with medical marijuana licenses and who plan to grow their own plants to notify the city of their intent.

The city’s ordinance also had required license holders to open their homes for inspection to make sure that it was safe to operate such things as grow lights.

Hesse’s ruling came after the city admitted that portion of the ordinance went too far and would be in violation of the Unity Law, which was recently signed by Gov. Kevin Stitt.

Meanwhile, Hesse validated other parts of the ordinance, including efforts by the city to ban commercial growing and warehousing facilities for medical marijuana.

Attorneys representing Charles Bishop, Megan Dedmon and Jason Hodge, who had challenged the city law, said no decision had been made about appealing Hesse’s ruling.