If it appears to the court that the adultery or other offense complained of has been occasioned by the collusion of the parties or done with an intent to procure a divorce, that the complainant was consenting thereto, or that both parties have been guilty of the adultery or other offense or injury complained of in the complaint, then no divorce shall be granted or decreed.