fix url in id of credential

This commit is contained in:
Cayo Puigdefabregas 2024-01-10 19:11:22 +01:00
parent 139cae7c87
commit 1c37368d1f

View file

@ -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,