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
1 changed files with 5 additions and 1 deletions

View File

@ -527,8 +527,12 @@ class VerificableCredential(models.Model):
format = "%Y-%m-%dT%H:%M:%SZ" format = "%Y-%m-%dT%H:%M:%SZ"
issuance_date = self.issued_on.strftime(format) issuance_date = self.issued_on.strftime(format)
url_id = "{}/credentials/{}".format(
settings.DOMAIN.strip("/"),
self.id
)
context = { context = {
'vc_id': self.id, 'vc_id': url_id,
'issuer_did': self.issuer_did.did, 'issuer_did': self.issuer_did.did,
'subject_did': self.subject_did and self.subject_did.did or '', 'subject_did': self.subject_did and self.subject_did.did or '',
'issuance_date': issuance_date, 'issuance_date': issuance_date,