fix issue credential next to pass didkit

This commit is contained in:
Cayo Puigdefabregas 2024-02-14 12:59:43 +01:00
parent 14167090b3
commit 3289b99b6e
1 changed files with 2 additions and 1 deletions

View File

@ -631,7 +631,6 @@ class VerificableCredential(models.Model):
if self.status == self.Status.ISSUED: if self.status == self.Status.ISSUED:
return return
self.status = self.Status.ISSUED
self.subject_did = did self.subject_did = did
self.issued_on = datetime.datetime.now().astimezone(pytz.utc) self.issued_on = datetime.datetime.now().astimezone(pytz.utc)
issuer_pass = cache.get("KEY_DIDS") issuer_pass = cache.get("KEY_DIDS")
@ -651,6 +650,8 @@ class VerificableCredential(models.Model):
else: else:
self.data = self.user.encrypt_data(data, password) self.data = self.user.encrypt_data(data, password)
self.status = self.Status.ISSUED
def get_context(self, domain): def get_context(self, domain):
d = json.loads(self.csv_data) d = json.loads(self.csv_data)
issuance_date = '' issuance_date = ''