The ampullae of lorenzini are the electromagnetic sensing organs of sharks, and it is well know how they are extremely sensitive to such, and controlled studies have been shown that generated electromagnetic fields can repel sharks at times, but I am a bit skeptical about using small magnets.
I would be pleased to be wrong and have this work though!