From a2d859494b4a5d5a162fdecb6ca1d53060987e28 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 28 Nov 2024 16:22:06 +0100 Subject: [PATCH] fix json call to chid --- did/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/did/views.py b/did/views.py index 711e4be..493925d 100644 --- a/did/views.py +++ b/did/views.py @@ -95,7 +95,6 @@ class PublicDeviceWebView(TemplateView): 'components': components, 'manufacturer DPP': '', 'device': {}, - 'components': [], } result = { '@context': ['https://ereuse.org/dpp0.json'], @@ -132,8 +131,10 @@ class PublicDeviceWebView(TemplateView): dev = Build(d.doc, None, check=True) doc = dev.get_phid() ev = json.dumps(doc) + phid = dev.get_signature(ev) + dpp = "{}:{}".format(self.pk, phid) rr = { - 'dpp': d.key, + 'dpp': dpp, 'document': ev, 'algorithm': ALGORITHM, 'manufacturer DPP': '',