cred_snapshots #4

Merged
cayop merged 8 commits from cred_snapshots into release 2025-01-07 16:27:18 +00:00
Showing only changes of commit 3a7eb0f97e - Show all commits

View file

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