Skip to content

Commit

Permalink
fix: make sure OwnerDN is defined before trying to access its value
Browse files Browse the repository at this point in the history
  • Loading branch information
aldbr committed Feb 6, 2024
1 parent 7e60c05 commit e30f9f4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def validate(self, request):
@staticmethod
def _hasOwner(request):
"""required attributes Owner and OwnerGroup"""
if not (request.Owner or request.OwnerDN):
if not (request.Owner or getattr(request, "OwnerDN", None)):
return S_ERROR(f"Request '{request.RequestName}' is missing both Owner and OwnerDN value")
if not request.OwnerGroup:
return S_ERROR(f"Request '{request.RequestName}' is missing OwnerGroup value")
Expand Down

0 comments on commit e30f9f4

Please sign in to comment.