use isinstance

This commit is contained in:
wh1te909 2022-04-20 17:03:01 +00:00
parent 227636b705
commit 2190a2ed25
1 changed files with 2 additions and 2 deletions

View File

@ -439,7 +439,7 @@ class Alert(models.Model):
)
# command was successful
if type(r) == dict:
if isinstance(r, dict):
alert.action_retcode = r["retcode"]
alert.action_stdout = r["stdout"]
alert.action_stderr = r["stderr"]
@ -561,7 +561,7 @@ class Alert(models.Model):
)
# command was successful
if type(r) == dict:
if isinstance(r, dict):
alert.resolved_action_retcode = r["retcode"]
alert.resolved_action_stdout = r["stdout"]
alert.resolved_action_stderr = r["stderr"]