Skip to content

Commit

Permalink
Get checktype from API for updating checks
Browse files Browse the repository at this point in the history
  • Loading branch information
NodePing committed Apr 4, 2024
1 parent ad68802 commit 417667d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nodeping.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@
- name: Modify an existing check to ping IPv6
nodeping:
action: update
checktype: PING
checkid: 201205050153W2Q4C-0J2HSIRF
ipv6: yes
Expand Down Expand Up @@ -513,9 +512,9 @@ def update_nodeping_check(parameters):
label = parameters["label"]
customerid = parameters["customerid"]
check_id = parameters["checkid"]
checktype = parameters["checktype"]
oldresult = nodepingpy.checks.get_by_id(token, check_id, customerid)

checktype = oldresult["type"]

# Sometimes dep is an empty string, set it to False since updating it
# may set the value to False
if oldresult["dep"] == "":
Expand Down

0 comments on commit 417667d

Please sign in to comment.