Fix managed zone lookup to ensure correct domain is selected where there are two domains with the same ending e.g. example.com and thisisanexample.com

This commit is contained in:
Paul Morgan 2023-11-11 12:44:35 +00:00
parent 9913d7a1a1
commit 4e1a3cc19e

View file

@ -97,7 +97,7 @@ class _ionosClient(object):
# is a subdomain
for zone in zones:
# get the zone id
if domain.endswith(zone['name']):
if domain.endswith(f".{zone['name']}"):
return zone['id'], zone['name']
return None, None