Are boundary conditions with and without a magnetic field compatible