fix names
This commit is contained in:
parent
2f68eff954
commit
6212075852
|
@ -140,7 +140,7 @@ class PublicDeviceWebView(TemplateView):
|
||||||
'shortid': self.object.shortid,
|
'shortid': self.object.shortid,
|
||||||
'uuids': self.object.uuids,
|
'uuids': self.object.uuids,
|
||||||
'hids': self.object.hids,
|
'hids': self.object.hids,
|
||||||
'components': self.remove_serial_numnber_from(self.object.components),
|
'components': self.remove_serial_number_from(self.object.components),
|
||||||
}
|
}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -150,7 +150,7 @@ class PublicDeviceWebView(TemplateView):
|
||||||
'components': self.object.components,
|
'components': self.object.components,
|
||||||
}
|
}
|
||||||
|
|
||||||
def remove_serial_numnber_from(self, components):
|
def remove_serial_number_from(self, components):
|
||||||
for component in components:
|
for component in components:
|
||||||
if 'serial_number' in component:
|
if 'serial_number' in component:
|
||||||
del component['SerialNumber']
|
del component['SerialNumber']
|
||||||
|
|
|
@ -89,7 +89,7 @@ class Evidence:
|
||||||
return self.components
|
return self.components
|
||||||
|
|
||||||
def get_manufacturer(self):
|
def get_manufacturer(self):
|
||||||
if self.is_new_snapshot():
|
if self.is_web_snapshot():
|
||||||
kv = self.doc.get('kv', {})
|
kv = self.doc.get('kv', {})
|
||||||
if len(kv) < 1:
|
if len(kv) < 1:
|
||||||
return ""
|
return ""
|
||||||
|
@ -101,7 +101,7 @@ class Evidence:
|
||||||
return self.dmi.manufacturer().strip()
|
return self.dmi.manufacturer().strip()
|
||||||
|
|
||||||
def get_model(self):
|
def get_model(self):
|
||||||
if self.is_new_snapshot():
|
if self.is_web_snapshot():
|
||||||
kv = self.doc.get('kv', {})
|
kv = self.doc.get('kv', {})
|
||||||
if len(kv) < 2:
|
if len(kv) < 2:
|
||||||
return ""
|
return ""
|
||||||
|
@ -144,5 +144,5 @@ class Evidence:
|
||||||
def is_legacy(self):
|
def is_legacy(self):
|
||||||
return self.doc.get("software") != "workbench-script"
|
return self.doc.get("software") != "workbench-script"
|
||||||
|
|
||||||
def is_new_snapshot(self):
|
def is_web_snapshot(self):
|
||||||
return self.doc.get("type") == "WebSnapshot"
|
return self.doc.get("type") == "WebSnapshot"
|
||||||
|
|
Loading…
Reference in New Issue