You didn't have to recalibrate.I have had to recalibrate my M2Z a few times when flying from my back porch metal table and chairs. Move away and the message disappears.
There was nothing wrong with your compass and nothing that needed recalibrating.
The compass was just warning you of the magnetic interference close by.
Simply powering off and moving away was all that was needed.