A person experienced doubt about ritual impurity (janabah) about half an hour before the dawn prayer. They decided to sleep instead of waking up to perform the necessary ablution, forgetting that they needed to wake up before dawn. When they finally woke up, they found no signs of impurity and did not remember having an erotic dream. They based their actions on the state of purity. What is the ruling regarding their fast?