From 4b069cc2b0de98d1f29c2a8d1760a449a614410d Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sat, 23 Apr 2022 07:43:30 +0000 Subject: [PATCH] fix pending actions showing agent pending update even though it was already updated --- api/tacticalrmm/core/tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/tacticalrmm/core/tasks.py b/api/tacticalrmm/core/tasks.py index 80381c7e..8c538627 100644 --- a/api/tacticalrmm/core/tasks.py +++ b/api/tacticalrmm/core/tasks.py @@ -83,7 +83,7 @@ def handle_resolved_stuff() -> None: for agent in agent_queryset.annotate( has_pending_actions=Exists( PendingAction.objects.filter( - pk=OuterRef("pk"), action_type="agent_update", status="pending" + agent=OuterRef("pk"), action_type="agentupdate", status="pending" ) ) ): @@ -97,7 +97,7 @@ def handle_resolved_stuff() -> None: and agent.has_pending_actions ): agent.pendingactions.filter( - action_type="agent_update", status="pending" + action_type="agentupdate", status="pending" ).update(status="completed") # sync scheduled tasks