
86 P.3d 63 (2004)
192 Or. App. 365
Su Yong KIM, Respondent,
v.
Chon Sik PARK and Bok Soon Park, husband and wife, Appellants, and
Johan Cen, William Itzineag, Johnny Perea, and Patricia Maldonado, Defendants.
0101-00700; A117419.
Court of Appeals of Oregon.
Argued and Submitted November 4, 2003.
Decided March 3, 2004.
*64 Margaret H. Leek Leiberan, Portland, argued the cause for appellants. With her on the briefs was Richard L. Grant.
S. Ward Greene, Portland, argued the cause for respondent. With him on the brief were Sanford R. Landress, and Greene & Markley, P. C.
Before EDMONDS, Presiding Judge, and WOLLHEIM and SCHUMAN, Judges.
EDMONDS, P.J.
Defendants appeal from the trial court's judgment granting strict foreclosure and attorney fees to plaintiff. Defendants argue that the trial court erred when it concluded that plaintiff's earlier failure to comply with a contractual requirement did not preclude plaintiff from obtaining the remedy of strict foreclosure. They also assign error to the trial court's award of attorney fees to plaintiff, arguing that defendants are the only parties entitled to attorney fees or, alternatively, that both defendants and plaintiff are entitled to attorney fees. We review the trial court's grant of strict foreclosure de novo on the record, ORS 19.415(3) (2001), reverse the trial court's judgment granting strict foreclosure and remand for entry of an award of attorney fees to defendants.[1]*65 Defendants purchased an apartment building from plaintiff by a land sale contract. At the time of the purchase, the apartment building violated the Portland Housing Code in a number of ways. The contract provides for the resolution of those violations after the sale:
"(1) The premises are subject to the following:
"* * * * *
"(c) City of Portland code violation and possible lien, as shown by Case No. HOU97-01258 recorded July 14, 1997 as Fee No. 97104746
"* * * * *
"(2) Seller shall correct the plumbing code violation described in paragraph (1)(c) above within eight months from the date hereof, and seller shall indemnify and hold buyer harmless therefrom. Buyer shall cooperate with seller in obtaining any necessary permits and providing access to the premises to complete repairs and other acts reasonably necessary to correct the plumbing code violations. Buyer shall correct violations with respect to expose[d] ceiling joists (sheetrock repair) and bare wood (siding repair) within twelve months within the date hereof and buyer shall indemnify and hold seller harmless therefrom. Except for these repairs by buyer, all of the other repairs required under paragraph (1)(c) shall be the responsibility of seller, and seller shall indemnify and hold buyer harmless therefrom."
The contract also provides that, in the event of litigation between the parties, the prevailing party is entitled to attorney fees both at trial and on appeal.
Plaintiff did not repair the plumbing within the eight-month period that the contract required. He contends that he attempted to repair the plumbing approximately 12 months after the parties entered into the contract, or four months after the end of the contractually required period. His actions at that time were limited to cutting holes in the walls of the apartments to expose the plumbing. Seven weeks later, plaintiff sent plumbers to the apartment early one morning without notice to defendants, supposedly in an effort to make the repairs that were necessary to bring the building up to code. Defendants ordered the plumbers to leave and refused to allow plaintiff to send other plumbers to the property. Defendants subsequently refused to make the ongoing payments that they owed plaintiff under the contract, and plaintiff filed this action for strict foreclosure.
Defendants asserted as an affirmative defense to plaintiff's foreclosure action that his failure to repair the plumbing was a material breach that excused the performance of their obligations under the contract until the breach was remedied. They also counterclaimed for damages for the breach. Their counterclaim was submitted to a jury, which found for defendants and awarded damages to them.[2] Plaintiff's claim for strict foreclosure was tried to the trial court. It concluded that plaintiff's breach was not material and therefore did not excuse defendants' failure to perform. The court accordingly awarded strict foreclosure to plaintiff, leading to defendants' appeal.
"Generally, a vendor is entitled to strict foreclosure when the vendee fails to comply with the contract terms in paying the purchase price." Vista Management v. Cooper, 81 Or.App. 660, 665, 726 P.2d 974 (1986) (citing Blondell v. Beam, 243 Or. 293, 299, 413 P.2d 397 (1966)). However, in some circumstances, an award of strict foreclosure may be inequitable even when the vendee has not complied with the terms of the contract. See, e.g., Staats v. Praegitzer, 67 Or.App. 543, 545, 679 P.2d 334, rev. den., 297 Or. 339, 683 P.2d 1370 (1984) (waiver of contractual rights); Coleman v. Medgin, 52 Or.App. 1049, 1053, 630 P.2d 404 (1981) (substantial increase in the value of the property). Moreover, a party who seeks to recover damages on a contract must plead and prove its own performance or a valid excuse for its failure to perform. See Wasserburger v. Amer. Sci. *66 Chem., 267 Or. 77, 82, 514 P.2d 1097 (1973). That principle is consistent with Restatement (Second) of Contracts, section 237 (1981). With regard to those principles, a material breach of a land sale contract by a party will prevent that party from obtaining strict foreclosure of the contract and excuse the other party's obligation to perform. Cf. Reeder v. Kay, 282 Or. 191, 577 P.2d 925 (1978) (holding that an immaterial breach of a land sale contract did not defeat strict foreclosure). Here, plaintiff is not entitled to strict foreclosure of the contract if his failure to repair the plumbing was an unjustified material breach of the parties' agreement.
Plaintiff contends that, but for defendants' refusal to allow his plumbers to repair the plumbing, he would have satisfied his contractual obligation to do so. However, plaintiff made no effort to repair the plumbing until almost four months after the contractually required period and he waited another seven weeks before sending plumbers to do a partial repair. In order to make the partial repairs in the way that plaintiff intended, the plumbers would have had to shut off water to defendants' tenants for an extended period during each stage of the repairs. Given plaintiff's failure to make any effort to repair the plumbing within the eight-month period specified in the contract and the likely adverse impact of piecemeal repairs on their tenants, defendants' refusal to allow plaintiff to make partial repairs to the plumbing at that late date was reasonable. We conclude that plaintiff does not have a valid excuse for his failure to perform under the contract.
The next issue is whether plaintiff's failure to perform the plumbing repairs was a material breach of the parties' agreement. "Generally, whether a breach is material is a question of fact to be decided by the jury, unless the facts are undisputed; then it is a question of law for the court." McKeon v. Williams, 104 Or.App. 106, 109, 799 P.2d 198 (1990), aff'd, 312 Or. 322, 822 P.2d 699 (1991). "A breach is material if it goes to the very substance of the contract and defeats the object of the parties entering into the contract." Bisio v. Madenwald, 33 Or.App. 325, 331, 576 P.2d 801, rev. den., 283 Or. 1, 580 P.2d 1030 (1978). The evidence shows that, as a result of the code violations, the City of Portland continued to assess fines against defendants and defendants lost some tenants. Although the contract required plaintiff to pay those fines, the requirement that plaintiff repair the plumbing within eight months was intended to insure that the building's plumbing satisfy the city code within a reasonable time after the sale. Defendants purchased the building from plaintiff so that they could rent out the apartments in it. Although the repairs to the plumbing in the building would have caused some temporary inconvenience to the tenants, the failure of plaintiff to make the repairs in accordance with the contract ultimately prevented defendants from using the building as intended by the parties' agreement. In light of that evidence, we hold that as a matter of law the plaintiff's failure to perform as promised was a material breach of the contract.
The trial court, besides ruling that plaintiff's breach was not material, also appeared to believe that defendants were adequately compensated by the jury's award of damages to them and against plaintiff. When plaintiff materially breached the contract by failing to make the plumbing repairs, defendants had a choice of remedies. They could have elected to seek rescission and restitution of the monies that they had paid, or they could have elected to affirm the contract and seek damages for plaintiff's breach. Because plaintiff's breach was material, defendants were not obligated to continue to perform their obligation to make the payments under the contract. See Restatement at § § 225, 237. Plaintiff's failure to repair the plumbing temporarily suspended defendants' obligation to make payments. Although the non occurrence of plaintiff's performance could have also operated to discharge defendant's obligation under the contract to make the payments if defendants sought and obtained rescission of the contract, defendants elected to affirm the contract by filing their counterclaim for damages. Their affirmation of the contract reinstated their obligation to make the payments under the contract once plaintiff performs or his failure to perform is otherwise excused. The *67 trial court therefore erred in holding that plaintiff was entitled to strict foreclosure. When plaintiff's material breach is cured by the satisfaction of the judgment for damages awarded to defendants, defendants' obligation to make the payments due under the contract will resume. As we understand defendants' position on appeal, we need not reach their second assignment of error based on our disposition of the trial court's grant of strict foreclosure.
Also, under our ruling, only defendants have prevailed and, thus, only they are entitled to attorney fees under the contract. We reverse the judgment of strict foreclosure and the award of attorney fees to plaintiff. We remand to allow the trial court to determine the appropriate attorney fees award to defendants and for such other relief as may be applied for by the parties.
Judgment of strict foreclosure and award of attorney fees to plaintiff reversed and remanded; otherwise affirmed.
NOTES
[1]  ORS 19.415 was amended by HB 2646. See Or. Laws 2003, ch. 576, § 88.

"The amendments to * * * ORS 19.415 * * * apply only to the appeal of judgments entered on or after the effective date of this 2003 Act. Any appeal of a judgment entered before the effective date of this 2003 act shall continue to be governed by the law in effect on the day immediately preceding the effective date of this 2003 Act."
Or. Laws 2003, Ch. 576, § 90a. Because the judgment on appeal was entered before the effective date of HB 2646, those amendments do no apply here.
[2]  When it entered judgment, the trial court set off the amount of the jury award from the amount defendants were required to pay to redeem the property.
