Phase diagram of the Potts model in an external magnetic field