From 2190a2ed2577514cf48f81438b1cb9fcb56ad572 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Wed, 20 Apr 2022 17:03:01 +0000 Subject: [PATCH] use isinstance --- api/tacticalrmm/alerts/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/tacticalrmm/alerts/models.py b/api/tacticalrmm/alerts/models.py index 079c2b98..21725197 100644 --- a/api/tacticalrmm/alerts/models.py +++ b/api/tacticalrmm/alerts/models.py @@ -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"]