Yeah, and for the better. The coup attempt is very controversial and it's not good guys vs bad guys situation.
To be fair, the west cheered for Erdogan up until Erdogan completely abandoned his initial positions. Later, the west simply worked with Turkey and Erdogan was properly elected through the years.
What the West was supposed to do? Invade Turkey? Assassinate the politician who consistently got about %50 of the vote of the Turks on elections with no less than %85 voter turnaround?
Foreign influence cannot solve local problems.