fix document
This commit is contained in:
parent
0903f53f8b
commit
8d37932aa0
11
did/views.py
11
did/views.py
|
@ -107,9 +107,16 @@ class PublicDeviceWebView(TemplateView):
|
||||||
}
|
}
|
||||||
dev = Build(self.object.last_evidence.doc, None, check=True)
|
dev = Build(self.object.last_evidence.doc, None, check=True)
|
||||||
doc = dev.build.get_doc()
|
doc = dev.build.get_doc()
|
||||||
|
components = [x for x in doc if x[0] != "computer"]
|
||||||
|
device = ''
|
||||||
|
|
||||||
|
for d in doc:
|
||||||
|
if d[0] == "computer":
|
||||||
|
device = d[1]
|
||||||
|
|
||||||
data['document'] = json.dumps(doc)
|
data['document'] = json.dumps(doc)
|
||||||
data['device'] = doc.device
|
data['device'] = device
|
||||||
data['components'] = doc.components
|
data['components'] = components
|
||||||
|
|
||||||
self.object.get_evidences()
|
self.object.get_evidences()
|
||||||
last_dpp = Proof.objects.filter(
|
last_dpp = Proof.objects.filter(
|
||||||
|
|
Loading…
Reference in a new issue