California cities and counties considering rules for where and how marijuana businesses can open shop may need to conduct an additional environmental review, the state Supreme Court said Monday.

In a unanimous ruling, the state’s high court said the city of San Diego did not go far enough in scrutinizing the potential impacts of its 2014 medical marijuana ordinance, which effectively allowed for 30 dispensaries. The city incorrectly determined that its ordinance was not a project for purposes of the California Environmental Quality Act, or CEQA, which mandates review of certain developments’ impacts on traffic, air pollution and other quality-of-life issues.