A lawyer can represent a divorcing husband even though she helped to draft his wife’s last will and testament at her previous firm, a Brooklyn appellate court found Wednesday.

The Appellate Division, Second Department, determined the past legal work of Dorothy Courten of Hauppauge was “not substantially related” to her representation of husband Joseph Sessa in the matrimonial proceedings.