have somebody/something to thank (for something)

US /hæv ˈsʌmˌbɑːdi/ˈsʌmˌθɪŋ tə θæŋk (fɔːr ˈsʌmˌθɪŋ)/
UK /hæv ˈsʌmˌbɑːdi/ˈsʌmˌθɪŋ tə θæŋk (fɔːr ˈsʌmˌθɪŋ)/
"have somebody/something to thank (for something)" picture
1.

n'avoir qu'à s'en prendre à, devoir remercier

to be grateful to someone or something for a particular outcome, often a negative one, implying that they are responsible for it

:
You have yourself to thank for this mess.
Tu n'as qu'à t'en prendre à toi-même pour ce désordre.
If we miss the flight, we'll have him to thank for it.
Si nous manquons le vol, nous pourrons le remercier pour ça.