From 453c5f47c26ca89ea93655de2066bc25be0a3a7b Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Fri, 28 Oct 2022 04:43:28 +0000 Subject: [PATCH] just kidding --- api/tacticalrmm/agents/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/tacticalrmm/agents/views.py b/api/tacticalrmm/agents/views.py index 827d48f9..f3eee768 100644 --- a/api/tacticalrmm/agents/views.py +++ b/api/tacticalrmm/agents/views.py @@ -7,7 +7,7 @@ import time from pathlib import Path from django.conf import settings -from django.db.models import Count, Exists, Prefetch, Q +from django.db.models import Count, Exists, OuterRef, Prefetch, Q from django.http import HttpResponse from django.shortcuts import get_object_or_404 from django.utils import timezone as djangotime @@ -142,7 +142,9 @@ class GetAgents(APIView): filter=Q(pendingactions__status=PAStatus.PENDING), ), has_patches_pending=Exists( - WinUpdate.objects.filter(action="approve", installed=False) + WinUpdate.objects.filter( + agent_id=OuterRef("pk"), action="approve", installed=False + ) ), ) )