From a0548b38c7b3445261f30cd1bc6b19e894083906 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 21 Oct 2024 11:24:09 +0200 Subject: [PATCH] change EreuseWorkbench for workbench-script --- evidence/models.py | 10 +++++----- evidence/parse.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/evidence/models.py b/evidence/models.py index 354cb89..eadb7a7 100644 --- a/evidence/models.py +++ b/evidence/models.py @@ -67,7 +67,7 @@ class Evidence: for xa in matches: self.doc = json.loads(xa.document.get_data()) - if self.doc.get("software") == "EreuseWorkbench": + if self.doc.get("software") == "workbench-script": dmidecode_raw = self.doc["data"]["dmidecode"] self.dmi = DMIParse(dmidecode_raw) @@ -80,7 +80,7 @@ class Evidence: self.created = self.annotations.last().created def get_components(self): - if self.doc.get("software") != "EreuseWorkbench": + if self.doc.get("software") != "workbench-script": return self.doc.get('components', []) self.set_components() return self.components @@ -92,7 +92,7 @@ class Evidence: return "" return list(self.doc.get('kv').values())[0] - if self.doc.get("software") != "EreuseWorkbench": + if self.doc.get("software") != "workbench-script": return self.doc['device']['manufacturer'] return self.dmi.manufacturer().strip() @@ -104,13 +104,13 @@ class Evidence: return "" return list(self.doc.get('kv').values())[1] - if self.doc.get("software") != "EreuseWorkbench": + if self.doc.get("software") != "workbench-script": return self.doc['device']['model'] return self.dmi.model().strip() def get_chassis(self): - if self.doc.get("software") != "EreuseWorkbench": + if self.doc.get("software") != "workbench-script": return self.doc['device']['model'] chassis = self.dmi.get("Chassis")[0].get("Type", '_virtual') diff --git a/evidence/parse.py b/evidence/parse.py index dfc5a1f..4f42934 100644 --- a/evidence/parse.py +++ b/evidence/parse.py @@ -57,7 +57,7 @@ class Build: } def get_hid_14(self): - if self.json.get("software") == "EreuseWorkbench": + if self.json.get("software") == "workbench-script": hid = self.get_hid(self.json) else: device = self.json['device']