Two Erie County judges have agreed to be admonished for making prohibited political contributions, the state Commission on Judicial Conduct announced Tuesday.

According to the commission, Hamburg Village Court Justice Andrew Fleming bought more than $12,000 worth of tickets to politically sponsored events from 2006 to 2013 through his spouse and law firm outside of the “window period” for permissible political activity by judges.