The terms of a will cannot contradict a divorce degree.
Although your question doesn't contain adequate detail here are some points for you to consider that answer the most common inquiries about wills and divorce. A will written prior to a divorce is void as to any provisions made for the former spouse in most jurisdictions. Even if the testator left all his estate to his wife Louise and never wrote a new will, Louise would not receive the inheritance unless it was clear the gift was to be given even if the couple later divorced. Therefore the divorce decree takes precedence.
Alternatively, a will written prior to a marriage will not distribute the decedent's property as stated in the will. The surviving spouse is entitled to a statutory share even if the decedent forgot to make a new will following the marriage.