From 76ce4296f3ee3488e3631332d4b33a4d07c99fb1 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sun, 11 Apr 2021 07:25:37 +0000 Subject: [PATCH] fix graphics --- api/tacticalrmm/agents/models.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/api/tacticalrmm/agents/models.py b/api/tacticalrmm/agents/models.py index caa523de..6707b0e9 100644 --- a/api/tacticalrmm/agents/models.py +++ b/api/tacticalrmm/agents/models.py @@ -197,15 +197,21 @@ class Agent(BaseAuditModel): @property def graphics(self): - ret = [] + ret, mrda = [], [] try: graphics = self.wmi_detail["graphics"] for i in graphics: caption = [x["Caption"] for x in i if "Caption" in x][0] if "microsoft remote display adapter" in caption.lower(): + mrda.append("yes") continue ret.append([x["Caption"] for x in i if "Caption" in x][0]) + + # only return this if no other graphics cards + if not ret and mrda: + return "Microsoft Remote Display Adapter" + return ", ".join(ret) except: return "Graphics info requires agent v1.4.14"