According to the BBC, India’s patent office has rejected a patent application from Canadian company Standard Innovation Corp for a sex toy. The vibrating toy allegedly violates “public order and morality” in the country. Nonetheless, it was only 7 years ago that a court ruling in India said sex toys could not be considered obscene.

Ontario-based Standard Innovation Corp. applied for a patent in India for a new vibrator, to prevent generic gadgets from being added in the market, said Shamnad Basheer, a professor at India’s National Law School who is working on a book about public health law.

In April, the patents office rejected the application, saying that sex toys lead “to obscenity and moral deprivation of individuals.” “These are toys that are not considered useful or productive. Mostly these are considered to be morally degrading by the law,” the office said. “The law views sex toys negatively and has never engaged positively with the notion of sexual pleasure.”

In refusing the patent, the office also cited Section 377 of the Indian Penal Code, a 155-year-old colonial-era law that criminalizes gay sex and unnatural intercourse.

An appeal to strike down provisions of the law is pending before the Supreme Court.