Actor Maulik Pancholy attends the premiere of "Trishna" during the 2012 Tribeca Film Festival on Friday, April 27, 2012 in New York. (AP Photo/Evan Agostini, File)

After openly gay actor Maulik Pancholy was scheduled to speak at a middle school for an anti-bullying assembly, the district’s school board unanimously blocked the appearance, with two members condemning his “lifestyle.”

All nine of the Cumberland Valley School Board’s members blocked Pancholy’s appearance at Mountain View Middle School in Mechanicsburg during a meeting on Monday. During the meeting, two of the members reportedly had reservations about Pancholy’s “lifestyle.”

“If you research this individual, he labels himself as an activist, he is proud of his lifestyle and I don’t think that should be imposed upon our students at any age,” said board member Bud Shaffner.

Another board member named Kelly Potteiger feared Pancholy would read from “The Best at It,” a children’s book he wrote about a gay, Indian-American boy.

“It’s not discriminating against his lifestyle — that’s his choice,” Potteiger said. “But it’s him speaking about it.”

The 50-year-old Pancholy is mostly known for his six combined seasons on the NBC sitcom “30 Rock” as Jonathan, the recurrent character Baljeet Tjinder on Disney Channel’s “Phineas and Ferb” and a combined six seasons portraying Sanjay Patel on the Showtime comedy-drama “Weeds.” He also worked on President Barack Obama’s Advisory Commission on Asian Americans and Pacific Islanders from 2014 to 2016.