We granted Andrew Groutas’s petition for interlocutory appeal to determine whether violation of a county ordinance on property owned by Groutas could render him liable for negligence per se, or whether he contracted responsibility for compliance with the ordinance to the tenant. Because we find that Groutas delegated this responsibility to *253the tenant, we reverse the trial court’s partial denial of Groutas’s motion for summary judgment.
Groutas owned commercial real estate which was bounded by a fence to which electrical outlets were attached. He leased part of the property to an individual who then subleased it to Marion Webb, a co-defendant. Webb sold recreational vehicles (“RVs”) on the property. The RVs were plugged into the electrical outlets on the fence. Joe McCoy sued Groutas and Webb, alleging he received an electrical shock when he placed his hand on the fence while inspecting one of Webb’s RVs. Mrs. McCoy sued for loss of consortium. The DeKalb County electrical inspector testified that the outlet attached to the fence was in violation of a DeKalb County ordinance because it did not have a ground wire.
Groutas moved for summary judgment, contending that he had fully parted with the property and relinquished control to the tenant and that Webb, the sublessee, had exclusive control of the property. The trial court granted the motion as to McCoy’s negligence claim but denied it as to McCoy’s claim for negligence per se based on the violation of the ordinance.
1. Summary judgment is appropriate when the court, viewing all the facts and reasonable inferences from those facts in a light most favorable to the non-moving party, concludes that the evidence does not create a triable issue as to any essential element of the case. Lau’s Corp. v. Haskins, 261 Ga. 491 (4) (405 SE2d 474) (1991). McCoy contends genuine issues of material fact remain regarding whether the property Groutas leased to Webb included the fence. But Groutas testified that he leased the fence, and the deposition testimony of the sublessee, Webb, is consistent with this. Webb testified that if any repairs to the fence were necessary that he, not Groutas, was responsible for the repair. In addition, paragraph 9 of the lease between Groutas and the tenant gives the tenant exclusive control of the premises and specifically provides that Groutas was only responsible for keeping in good repair specific items such as the roof, foundation and exterior walls. The fence and outlets are not specified in paragraph 9.
McCoy also argues that violation of the DeKalb County ordinance is negligence per se, and that there is a jury question as to whether paragraph 14 of the lease absolves Groutas of his obligation to comply with that ordinance. See, e.g., Northwestern Mut. Life Ins. Co. v. McGivern, 132 Ga. App. 297 (2) (208 SE2d 258) (1974) (violation of such ordinances is negligence per se). Paragraph 14 of the lease reads as follows: “Tenant agrees, at his own expense, to properly comply with all requirements of any legally constituted public authority [i.e., DeKalb County] made necessary by reason of Tenant’s occupancy of said premises. Landlord agrees to properly comply with *254such requirements if not made necessary by reason of Tenant’s occupancy. . . .” (Emphasis supplied.)
Although we have not specifically addressed whether a landlord can contract away the duty of compliance with a county electrical code, we have held that he cannot avoid the duties imposed by a housing code in a residential setting. But the owner of property not used as a “dwelling place” — as was the case here — can contract to avoid the duties to repair and improve the property set forth in OCGA §§ 44-7-13 and 44-7-14. See Gaffney v. EQK Realty Investors, 213 Ga. App. 653 (445 SE2d 771) (1994).
McCoy argues that because the wiring on the fence existed prior to Webb’s occupancy, compliance with the ordinance was not “made necessary” by Webb and was therefore Groutas’s non-delegable responsibility. We disagree. Compliance was necessary as a result of the use of the outlets for Webb’s RV business. Because Webb used the outlets in his RV business, he was responsible for assuring compliance with the ordinance.
Thus, because the lease gave the tenant both exclusive control of the premises as well as responsibility for compliance with any county ordinance made necessary by his occupancy, the trial court erred in denying Groutas summary judgment on McCoy’s negligence per se claim.
2. Mrs. McCoy’s right to recover for loss of consortium is dependent upon Mr. McCoy’s right to recover against Groutas. Lovelace v. Figure Salon, 179 Ga. App. 51, 53 (3) (345 SE2d 139) (1986). Given our holding in Division 1 that the trial court erred in denying Groutas summary judgment, we likewise hold that it erred in denying summary judgment as to Mrs. McCoy’s claim.
3. In light of our holding above that Groutas has no liability in tort, his motion for summary judgment on the issue of punitive damages should likewise have been granted by the trial court. See Families First v. Gooden, 211 Ga. App. 272 (7) (439 SE2d 34) (1993).
Judgment reversed.
Beasley, C. J., Birdsong, P. J., Andrews, Johnson and Smith, JJ., concur. McMurray, P. J., Pope, P. J., and Blackburn, J., dissent.