fix get_doc with build.get_doc
This commit is contained in:
parent
ccaa8834dc
commit
0903f53f8b
|
@ -106,7 +106,7 @@ class PublicDeviceWebView(TemplateView):
|
||||||
'device': {},
|
'device': {},
|
||||||
}
|
}
|
||||||
dev = Build(self.object.last_evidence.doc, None, check=True)
|
dev = Build(self.object.last_evidence.doc, None, check=True)
|
||||||
doc = dev.get_doc()
|
doc = dev.build.get_doc()
|
||||||
data['document'] = json.dumps(doc)
|
data['document'] = json.dumps(doc)
|
||||||
data['device'] = doc.device
|
data['device'] = doc.device
|
||||||
data['components'] = doc.components
|
data['components'] = doc.components
|
||||||
|
|
|
@ -12,7 +12,7 @@ from dpp.models import Proof
|
||||||
|
|
||||||
|
|
||||||
class ProofView(View):
|
class ProofView(View):
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
timestamp = kwargs.get("proof_id")
|
timestamp = kwargs.get("proof_id")
|
||||||
proof = Proof.objects.filter(timestamp=timestamp).first()
|
proof = Proof.objects.filter(timestamp=timestamp).first()
|
||||||
|
@ -22,9 +22,9 @@ class ProofView(View):
|
||||||
ev = Evidence(proof.uuid)
|
ev = Evidence(proof.uuid)
|
||||||
if not ev.doc:
|
if not ev.doc:
|
||||||
return JsonResponse({}, status=404)
|
return JsonResponse({}, status=404)
|
||||||
|
|
||||||
dev = Build(ev.doc, None, check=True)
|
dev = Build(ev.doc, None, check=True)
|
||||||
doc = dev.get_phid()
|
doc = dev.build.get_doc()
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
"algorithm": ALGORITHM,
|
"algorithm": ALGORITHM,
|
||||||
|
|
Loading…
Reference in a new issue