fix alert template not assigned on new agent fixes #1896

This commit is contained in:
wh1te909 2024-06-19 04:23:44 +00:00
parent 203a15b447
commit 0235dadbf7
1 changed files with 2 additions and 0 deletions

View File

@ -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)