急时抱佛脚/ 急時抱佛腳jíshíbàofójiǎoto seek help only in a crisis
(proverb) to wait until the last minute before taking action; to lack preparation and scramble for help when an emergency arises; literally "to embrace the Buddha's feet only when in distress"