fix alert template not assigned on new agent fixes #1896
This commit is contained in:
parent
203a15b447
commit
0235dadbf7
|
@ -14,6 +14,7 @@ from rest_framework.views import APIView
|
||||||
from accounts.models import User
|
from accounts.models import User
|
||||||
from agents.models import Agent, AgentHistory
|
from agents.models import Agent, AgentHistory
|
||||||
from agents.serializers import AgentHistorySerializer
|
from agents.serializers import AgentHistorySerializer
|
||||||
|
from alerts.tasks import cache_agents_alert_template
|
||||||
from apiv3.utils import get_agent_config
|
from apiv3.utils import get_agent_config
|
||||||
from autotasks.models import AutomatedTask, TaskResult
|
from autotasks.models import AutomatedTask, TaskResult
|
||||||
from autotasks.serializers import TaskGOGetSerializer, TaskResultSerializer
|
from autotasks.serializers import TaskGOGetSerializer, TaskResultSerializer
|
||||||
|
@ -491,6 +492,7 @@ class NewAgent(APIView):
|
||||||
|
|
||||||
ret = {"pk": agent.pk, "token": token.key}
|
ret = {"pk": agent.pk, "token": token.key}
|
||||||
sync_mesh_perms_task.delay()
|
sync_mesh_perms_task.delay()
|
||||||
|
cache_agents_alert_template.delay()
|
||||||
return Response(ret)
|
return Response(ret)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue