From 0235dadbf732ae4c469ce1e02c96b701ef635cda Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Wed, 19 Jun 2024 04:23:44 +0000 Subject: [PATCH] fix alert template not assigned on new agent fixes #1896 --- api/tacticalrmm/apiv3/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/tacticalrmm/apiv3/views.py b/api/tacticalrmm/apiv3/views.py index ef014425..a2ab0b64 100644 --- a/api/tacticalrmm/apiv3/views.py +++ b/api/tacticalrmm/apiv3/views.py @@ -14,6 +14,7 @@ from rest_framework.views import APIView from accounts.models import User from agents.models import Agent, AgentHistory from agents.serializers import AgentHistorySerializer +from alerts.tasks import cache_agents_alert_template from apiv3.utils import get_agent_config from autotasks.models import AutomatedTask, TaskResult from autotasks.serializers import TaskGOGetSerializer, TaskResultSerializer @@ -491,6 +492,7 @@ class NewAgent(APIView): ret = {"pk": agent.pk, "token": token.key} sync_mesh_perms_task.delay() + cache_agents_alert_template.delay() return Response(ret)