Skip to content

Commit

Permalink
dnsmadeeasy: only get monitor if it is not null api response (#4459)
Browse files Browse the repository at this point in the history
* Only get monitor if it is not null api response

* Add changelog fragment

* Update changelogs/fragments/4459-only-get-monitor-if-it-is-not-null-api-response.yaml

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/modules/net_tools/dnsmadeeasy.py

Co-authored-by: Felix Fontein <[email protected]>

Co-authored-by: drevai <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
  • Loading branch information
3 people authored Apr 13, 2022
1 parent 8ccc4d1 commit 0667503
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- dnsmadeeasy - fix failure on deleting DNS entries when API response does not contain monitor value (https://github.com/ansible-collections/community.general/issues/3620).
2 changes: 1 addition & 1 deletion plugins/modules/net_tools/dnsmadeeasy.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ def main():
# Fetch existing monitor if the A record indicates it should exist and build the new monitor
current_monitor = dict()
new_monitor = dict()
if current_record and current_record['type'] == 'A':
if current_record and current_record['type'] == 'A' and current_record.get('monitor'):
current_monitor = DME.getMonitor(current_record['id'])

# Build the new monitor
Expand Down

0 comments on commit 0667503

Please sign in to comment.