(Associated Press) A California appeals court says it’s legal to have small amounts of marijuana in prison — so long as inmates don’t inhale.

The 3rd District Court of Appeals ruled that California voters legalized recreational possession of less than an ounce of cannabis in 2016, with no exception even for those behind bars.

But the court says state law does prohibit smoking weed in prison. Prison officials can also still punish pot possession as a rules violation.

Note: Read our discussion guidelines before commenting.