Praise be to Allah, the Lord of the World; and blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
As for one who takes an oath thinking that is so and then ascertains that is wrong, one has nothing to do since this is an unconscious oath.
Allah knows best.