From 927ff21b6d3c4c9a4b45c274bc4dbd60e946989e Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sun, 5 Jan 2020 11:14:47 +0000 Subject: [PATCH] fix saltid bug --- api/tacticalrmm/api/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/tacticalrmm/api/views.py b/api/tacticalrmm/api/views.py index 412220fd..d7dacedc 100644 --- a/api/tacticalrmm/api/views.py +++ b/api/tacticalrmm/api/views.py @@ -244,6 +244,7 @@ def delete_agent(request): try: user = User.objects.get(username=request.data["agentid"]) agent = get_object_or_404(Agent, agent_id=request.data["agentid"]) + saltid = agent.salt_id user.delete() agent.delete() except Exception as e: @@ -260,7 +261,7 @@ def delete_agent(request): { "client": "wheel", "fun": "key.delete", - "match": agent.salt_id, + "match": saltid, "username": settings.SALT_USERNAME, "password": settings.SALT_PASSWORD, "eauth": "pam",