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
…4500)

* 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]>
(cherry picked from commit 0667503)

Co-authored-by: drevai753 <[email protected]>
  • Loading branch information
patchback[bot] and drevai753 authored Apr 13, 2022
1 parent 26d5409 commit 70a3dae
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 70a3dae

Please sign in to comment.