The ruling is based on the idea that there is no state or federal constitutional right to operate a dispensary, therefore no right has been taken away by implementation of the city-wide ban. However, an interesting issue that may develop down the road is whether the dispensaries can successfully make an analogy between marijuana dispensaries and adult entertainment.
On its face, it seems that the Longmont ban is based on morality. I can only guess that the citizens of Longmont have decided that they would prefer not to have marijuana sold within city limits, because they do not believe in the sale of marijuana, regardless of whether it is for health care or recreational purposes. This seems like the same argument that has been made for adult entertainment for 70 years. Basically, “we don’t want it in our community.”
Without delving into the litany of U.S. Supreme Court cases regarding adult entertainment, the short version is that adult entertainment is a form of protected speech, and therefore a community can limit where it occurs under the police powers of the state, but it cannot absolutely ban it. There must be a time and place for adult entertainment.
While I don’t specialize in medical marijuana (I’ve never done a single case), this sounds like a persuasive argument. The dispensaries have lost the first round arguing that they have Fifth Amendment protection, but maybe they can find success by arguing that the First Amendment applies. While limitations on the time and manner for marijuana sales may not be ideal, at least it would be a way to operate within city limits.