96-add-serial-number-in-public-web #24

Merged
cayop merged 10 commits from 96-add-serial-number-in-public-web into main 2024-11-06 16:30:19 +00:00
2 changed files with 5 additions and 5 deletions
Showing only changes of commit a67fda6b51 - Show all commits

View File

@ -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']

View File

@ -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"