diff --git a/device/views.py b/device/views.py index f99c196..319f8cf 100644 --- a/device/views.py +++ b/device/views.py @@ -140,7 +140,7 @@ class PublicDeviceWebView(TemplateView): 'shortid': self.object.shortid, 'uuids': self.object.uuids, 'hids': self.object.hids, - 'components': self.remove_serial_numnber_from(self.object.components), + 'components': self.remove_serial_number_from(self.object.components), } @property @@ -150,7 +150,7 @@ class PublicDeviceWebView(TemplateView): 'components': self.object.components, } - def remove_serial_numnber_from(self, components): + def remove_serial_number_from(self, components): for component in components: if 'serial_number' in component: del component['SerialNumber'] diff --git a/evidence/models.py b/evidence/models.py index a34be69..e9af092 100644 --- a/evidence/models.py +++ b/evidence/models.py @@ -89,7 +89,7 @@ class Evidence: return self.components def get_manufacturer(self): - if self.is_new_snapshot(): + if self.is_web_snapshot(): kv = self.doc.get('kv', {}) if len(kv) < 1: return "" @@ -101,7 +101,7 @@ class Evidence: return self.dmi.manufacturer().strip() def get_model(self): - if self.is_new_snapshot(): + if self.is_web_snapshot(): kv = self.doc.get('kv', {}) if len(kv) < 2: return "" @@ -144,5 +144,5 @@ class Evidence: def is_legacy(self): return self.doc.get("software") != "workbench-script" - def is_new_snapshot(self): + def is_web_snapshot(self): return self.doc.get("type") == "WebSnapshot"