The magnetic Schrödinger operator on the 8-shaped graph is studied. It is shown that for specially chosen vertex conditions the spectrum of the magnetic operator is independent on the flux through one of the loops, provided the flux through the other loop is zero. Topological reasons for this effect are explained.