The first is talking about the form of the contract - The contract in the form in which it was written by Peter is unacceptable. The second is talking about the contract itself - The contract written by Peter, not, for example, the contract written by Paul. In practice there may not be a great deal of difference in significance.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.