Is it mandatory to be in Turkey for 14 days for non Turkish residents, If we want to flight from Turkey to abroad?

I want to travel to Istanbul from Iran and the next day I’ll fly to Canada from Istanbul (Two flights would be done by Qatar Airways). Can I do that?
Is it mandatory to be in Turkey for 14 days for non-Turkish residents, If we want to flight from Turkey to abroad?