issue with out save credential

This commit is contained in:
Cayo Puigdefabregas 2024-11-29 10:59:36 +01:00
parent baa4d87a11
commit 3a7eb0f97e

View file

@ -680,7 +680,7 @@ class VerificableCredential(models.Model):
credential_subject = ujson.loads(data).get("credentialSubject", {})
return credential_subject.items()
def issue(self, did, domain):
def issue(self, did, domain, encrypt=True):
if self.status == self.Status.ISSUED:
return
@ -700,6 +700,9 @@ class VerificableCredential(models.Model):
if not valid:
return
if not encrypt:
return vc_str
self.data = self.user.encrypt_data(vc_str)
self.status = self.Status.ISSUED