From 1c37368d1f3cea9cca15a4afdb40662ae67951a0 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 10 Jan 2024 19:11:22 +0100 Subject: [PATCH] fix url in id of credential --- idhub/models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/idhub/models.py b/idhub/models.py index 7d1ef6c..b81f32c 100644 --- a/idhub/models.py +++ b/idhub/models.py @@ -527,8 +527,12 @@ class VerificableCredential(models.Model): format = "%Y-%m-%dT%H:%M:%SZ" issuance_date = self.issued_on.strftime(format) + url_id = "{}/credentials/{}".format( + settings.DOMAIN.strip("/"), + self.id + ) context = { - 'vc_id': self.id, + 'vc_id': url_id, 'issuer_did': self.issuer_did.did, 'subject_did': self.subject_did and self.subject_did.did or '', 'issuance_date': issuance_date,