DETROIT (AP) — An appeals court has affirmed the conviction of a Detroit school principal who was sentenced to two years in prison for taking bribes from a contractor.

Josette Buendia says she didn’t get a fair trial because she wasn’t allowed to show jurors that she used cash and gift cards to help her struggling school. But in a 3-0 decision Tuesday, a federal appeals court says using bribes for “commendable purposes” is not a defense for her crime.

READ MORE: U Of M Establishes New Sexual Misconduct Policy For Employees, Students

Buendia was principal at Bennett Elementary. She was one of 12 principals charged with accepting money and gifts from Norman Shy.

READ MORE: AG Nessel Reissues Consumer Alerts Amid Flooding, Power Outages In Michigan

The government says bogus invoices were submitted for paper and other supplies, causing the Detroit district to pay for materials that weren’t delivered. The scheme cost the district nearly $3 million.

MORE NEWS: 17-Year-Old Charged In Non-Fatal Shooting In Detroit

© 2018 Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.