Skip to content

Commit

Permalink
fix dns record check
Browse files Browse the repository at this point in the history
  • Loading branch information
aliel committed Sep 6, 2023
1 parent 08686a7 commit 3b8038c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/aleph/sdk/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,14 @@ async def check_domain(self, url: str, target: str, owner: Optional[str] = None)

if record_type == "txt":
found = False

for _res in res:
if hasattr(_res, "text") and _res.text == record_value:
found = True

if res is not None:
for _res in res:
if hasattr(_res, "text") and _res.text == record_value:
found = True
if found == False:
raise DomainConfigurationError(
(dns_rule["info"], dns_rule["on_error"], status)
)

elif (
res is None
or not hasattr(res, record_type)
Expand Down

0 comments on commit 3b8038c

Please sign in to comment.