From cf55838b382a39f65adb2ad24a371eb532db7f8c Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sat, 27 Jan 2024 02:51:39 +0000 Subject: [PATCH] feat: add serial number to linux/ma#1683 --- api/tacticalrmm/agents/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/tacticalrmm/agents/models.py b/api/tacticalrmm/agents/models.py index cc84de0082..c1ffd82d03 100644 --- a/api/tacticalrmm/agents/models.py +++ b/api/tacticalrmm/agents/models.py @@ -426,7 +426,10 @@ def physical_disks(self) -> Sequence[Disk]: @property def serial_number(self) -> str: if self.is_posix: - return "" + try: + return self.wmi_detail["serialnumber"] + except: + return "" try: return self.wmi_detail["bios"][0][0]["SerialNumber"]