fix pending actions showing agent pending update even though it was already updated

This commit is contained in:
wh1te909 2022-04-23 07:43:30 +00:00
parent c89349a43a
commit 4b069cc2b0
1 changed files with 2 additions and 2 deletions

View File

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