the Prophet (peace and blessings of Allaah be upon him) was asked by a woman, “O Messenger of Allaah, Allaah is not shy of (telling you) the truth. Does a woman have to do ghusl if she has an erotic dream?” The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Yes, if she sees water.” (Narrated by al-Bukhaari, 282; Muslim, 313). This indicates that it is not obligatory to do ghusl is one does not see water. Al-Mughni, 1/269.
But if one finds wetness, this must mean one of three things:
1 – That one is certain that it is maniy (semen), in which case ghusl is obligatory according to scholarly consensus. Al-Mughni, 1/269.
2 – That one is certain that it is not maniy, in which case ghusl is not obligatory, but this liquid must be washed away, because in this case the ruling is the same as the ruling on urine. Al-Sharh al-Mumti’, 1/280.
3 – If he is not sure what it is, and does not know whether it is maniy (semen) or madhiy (prostatic fluid). In this case there is a difference of opinion among the scholars:
Al-Nawawi stated in al-Majmoo’ (2/146) that the rulings on both maniy and madhiy apply, so he should do ghusl to remove the janaabah (impurity following sexual activity) on the basis that it may be maniy, and he should cleanse his clothes of the impurity on the basis that it might be madhiy – because he cannot discharge his duty of purifying himself without doing that.
The madhhab of Imam Ahmad, which was also the view preferred by Shaykh al-Islam Ibn Taymiyah, is that if he was thinking thoughts of desire before he fell asleep, or if he had played with his wife or looked at her, then this wetness should be counted as madhiy, because the liquid that is emitted because of those things is usually madhiy and the basic principle is that it is not anything else. So he should cleanse his clothes of the madhiy by sprinkling them with water, but he does not have to do ghusl.
But if he did not think thoughts of desire, or play with or look at his wife before falling asleep, then this wetness is to be considered as maniy, because of the report narrated by ‘Aa’ishah who said: “The Messenger of Allaah (peace and blessings of Allaah be upon him) was asked about a man who finds some wetness and does not remember having an erotic dream. He said: ‘He should do ghusl.’ And he was asked about a man who thought that he had had an erotic dream but he did not find any wetness. He said, ‘He does not have to do ghusl.’” (Narrated by Abu Dawood, 236; classed as hasan by al-Albaani in Saheeh Abi Dawood, 216.
Al-Khattaabi said in Ma’aalim al-Sunan: “The apparent meaning of this hadeeth is that ghusl is obligatory if one sees wetness, even if he is not certain that it is maniy. This opinion was narrated from a group of the Taabi’een, including ‘Ata’, al-Shu’bi and al-Nakha’i.”
This wetness has to have come out for a reason, and there is no apparent reason other than an erotic dream, and the water that usually comes out because of an erotic dream is maniy. So this uncertainty may be dealt with by going by what is most usual.
See al-Mughni, 1/270; Sharh al-‘Umdah, 1/353.
Having the wet dream it self is not a sin and does not invalidte the fast but if you know it to be maniy then you must do ghusl if you sure it isnt then no ghusl only wash the spot so you can pray as if you dont know well maniy the say smells like sour dough i agree with the second view more also read this
The seventh question of Fatwa no. 6320
Q: What is the ruling on a person who wakes up and then doubts that he had a wet dream but when he examines his underwear, he does not find Maniy (spermatic fluid)?
A: All praise be to Allah Alone, and peace and blessings be upon His Messenger, and his family and Companions.
The basic rule is that no Ghusl (ritual bath following major ritual impurity) is required of him (unless there is a clear evidence to prove that it is required), because what is certain cannot be overruled by what is doubtful.
May Allah grant us success! May peace and blessings be upon our Prophet Muhammad, his family, and Companions!
Permanent Committee for Scholarly Research and Ifta’
so i hope this helps