It was narrated that Ibn 'Abbas said: "The Messenger of Allah forbade selling something from the spoils of war prior to its distribution, having intercourse with a pregnant woman until she gives birth, and (eating) the flesh of any predator that has fangs. -- Sunan an-Nasa'i 4645 [grade: sahih] (sunnah.com)
Does this hadith imply it's haram to have sex when one's wife during pregnancy?