
    Argued and submitted December 19, 1984,
    affirmed April 10, 1985
    ADMINISTRATION SERVICE CO., Respondent, v. STALLINGS et al, Defendants WORKERS’ COMPENSATION DEPARTMENT et al, Respondents, SHINN, Appellant.
    
    (16-82-01378; CA A31568)
    698 P2d 56
    Keith Rodman, Eugene, argued the cause and filed the brief for appellant.
    
      P. Steven Cornacchia, Eugene, argued the cause and filed the brief for respondent Administration Service Co.
    Michael D. Reynolds, Assistant Attorney General, Salem, waived appearance for respondent Workers’ Compensation Department.
    Cynthia L. Phillips, Assistant County Counsel, Eugene, waived appearance for respondent Lane County, Oregon.
    Before Buttler, Presiding Judge, and Warren and Rossman, Judges.
    BUTTLER, P. J.
   BUTTLER, P. J.

Defendant Shinn, a junior lienholder on real property, appeals from a decree of judicial foreclosure, assigning as error the trial court’s granting of plaintiffs motion for summary judgment in this proceeding for judicial foreclosure of a trust deed. There are no factual issues in dispute, and the sole question is whether plaintiff was entitled to judgment as a matter of law. Seeborg v. General Motors Corporation, 284 Or 695, 699, 588 P2d 1100 (1978).

On July 27, 1979, plaintiff loaned $115,000 to defendants Stallings. The loan was evidenced by a promissory note in the amount of $115,000, to be paid in monthly installments; from September 1, 1979, to July 27, 1980, interest only was payable, and principal and interest payments were required commencing July 27, 1980. The note was secured by a trust deed on real property located in Lane County.

The Stallings failed to make monthly payments as required, and on May 8, 1980, plaintiff filed an action in Multnomah County for the amount of the delinquent interest payments, a penalty and interest on payments in arrears. It took a default judgment on July 11, 1980, in the amount of $15,166.67, representing interest on the principal amount of the loan, plus interest thereon of $2,527.78. The judgment was docketed in Lane County on July 21,1980, but plaintiff never executed on it.

This action for judicial foreclosure was filed in Lane County on February 17, 1982. Defendant Shinn, as a junior lienholder, was a named defendant. On March 11, 1982, the Stallings filed a Chapter 11 bankruptcy petition, thereby effecting an automatic stay of all actions pending against them. 11 USC § 362(a). On March 11,1983, plaintiff obtained a modification of the stay, permitting it to foreclose on the Lane County property, subject to the claims of junior lienors.

On August 30, 1983, plaintiff filed its amended complaint for judicial foreclosure. The court granted plaintiffs motion for summary judgment on March 26, 1984, and judgment of foreclosure was entered on April 3, 1984. Shinn contends that plaintiff was not entitled to summary judgment, because plaintiff never executed on its earlier judgment. He contends that execution, returned unsatisfied, is a prerequisite to the filing of foreclosure.

ORS 88.040 provides:
“During the pendency of an action for the recovery of a debt secured by any lien mentioned in ORS 88.010, a suit cannot be maintained for the foreclosure of the lien, nor thereafter, unless judgment is given in such action that the plaintiff recover the debt or some part thereof, and an execution thereon against the property of the defendant is returned unsatisfied in whole or in part.”

Under that statute, a creditor who elects to pursue legal action on a secured debt may not maintain a foreclosure proceeding to realize on the security unless he recovers judgment on the debt or some part thereof, levies execution and the execution is returned unsatisfied. Here, plaintiff did not seek or obtain judgment for the entire debt in the first action, and excludes from its prayer in the foreclosure action the amount covered by the 1980 judgment. Although the statute refers to a judgment for “the debt or some part thereof,” it is doubtful whether it is intended to preclude this foreclosure in which plaintiff excludes the amount of the first judgment from its prayer. We need not decide that question, however, because, even if the statute were applicable, plaintiff is excused from levying execution, because it was legally prevented from executing on the earlier judgment after the Stallings filed their bankruptcy petition. In Re Mellor, 734 F2d 1396, 1398 (9th Cir 1984).

Plaintiffs amended complaint for judicial foreclosure was filed after the Stallings filed their petition in bankruptcy. In March, 1984, the Stallings’ debts were discharged, thereby relieving them of their personal obligations on their debts, including plaintiffs earlier judgment. The discharge related back to the bankruptcy filing date. Execution on the judgment after the filing of the bankruptcy petition would not only have been futile, it would also have been a violation of the automatic stay, thereby rendering plaintiff in contempt of the bankruptcy court. A court will not require a mechanical application of the execution requirement under such circumstances. See Bowman v. Sherrill, 59 Or 603, 117 P 1122 (1911).

Shinn’s second contention is that plaintiff is not entitled to foreclosure on the secured property, because it elected to sue on the promissory note and is, therefore, barred from pursuing any other remedy under the “peculiar” terms of the note. The note permits plaintiff, after default, the options of:

“(1) Declaring the unpaid balance due and payable and taking action on the note or trust deed and/or;
“(2) Accepting the late payments plus a penalty.”

Shinn argues that, when plaintiff filed the action on the note, it elected the first remedy, thereby declaring the entire balance due and payable, even though it only sought and obtained judgment for less than the unpaid principal balance. According to Shinn, plaintiff is forever barred from taking any other action to recover on the note. The makers of the note have not raised that objection, and Shinn, a non-party to the loan transaction, has no standing to assert it.

Plaintiff is entitled to judgment on its claim for judicial foreclosure as a matter of law.

Affirmed. 
      
       Defendants Workers’ Compensation Department, State of Oregon and Lane County, Oregon, made no appearance in this court.
     
      
       11 USC § 362(a) provides, in part:
      “Except as provided in subsection (b) of this section, a petition filed under section 301, 302, or 303 of this title [11 USC § 301, 302 or 303] operates as a stay, applicable to all entities, of— i<* * * * *
      “(2) the enforcement, against the debtor or against property of the estate, of judgment obtained before the commencement of the case under this title [11 US §§ 1 et se<?]; <<* * * * *
      “(4) any act to create, perfect, or enforce any lien against property of the estate * *
     