California, United States of America
The following excerpt is from Hot Spot Inv. Co. v. Capitol Inv. Co., H040269 (Cal. App. 2014):
attorney fees because respondent voluntarily dismissed the declaratory relief cause of action along with the request for injunctive relief, leaving no claims in respondent's complaint to be adjudicated. The action was effectively terminated. Civil Code section 1717, subdivision (b)(2) precludes recovery of attorney fees in such cases: "Where an action has been voluntarily dismissed or dismissed pursuant to a settlement of the case, there shall be no prevailing party for purposes of this section."8 Thus, inasmuch as the remaining causes of action are based on the lease and therefore sound in contract, "section 1717 bars the defendant from recovering attorney fees incurred in defending those causes of action, even though the contract on its own terms authorizes recovery of those fees." (Santisas v. Goodin (1998) 17 Cal.4th 599, 617, italics omitted.)
The above passage should not be considered legal advice. Reliable answers to complex legal questions require comprehensive research memos. To learn more visit www.alexi.com.