From da87d452c2717be8a6b10d4d98a1f5d66886657d Mon Sep 17 00:00:00 2001 From: sadnub Date: Thu, 30 May 2024 00:26:53 -0400 Subject: [PATCH] fix tests --- api/tacticalrmm/alerts/models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/tacticalrmm/alerts/models.py b/api/tacticalrmm/alerts/models.py index 0b951011..278af079 100644 --- a/api/tacticalrmm/alerts/models.py +++ b/api/tacticalrmm/alerts/models.py @@ -515,6 +515,8 @@ class Alert(models.Model): "execution_time": 0, "retcode": status, } + else: + return # command was successful if isinstance(r, dict): @@ -685,6 +687,8 @@ class Alert(models.Model): "execution_time": 0, "retcode": status, } + else: + return # command was successful if isinstance(r, dict): @@ -724,7 +728,7 @@ class Alert(models.Model): value = get_db_value(string=f"{model}.{prop}", instance=self) if value is not None: - temp_arg = temp_arg.replace(string, str(value)) + temp_arg = temp_arg.replace(string, f"'{str(value)}'") temp_args.append(temp_arg)