fix schema credential and csv examples
This commit is contained in:
parent
821b6d3889
commit
ed1f36c1a1
|
@ -1,2 +1,2 @@
|
|||
name surnames email typeOfPerson membershipType organisation validFrom validUntil identityDocType identityNumber
|
||||
name surnames email typeOfPerson membershipType organisation affiliatedSince
|
||||
Pepe Gómez user1@example.org individual Member Pangea 01-01-2023
|
||||
|
|
|
|
@ -75,8 +75,10 @@ class ImportForm(forms.Form):
|
|||
if not data_pd:
|
||||
self.exception("This file is empty!")
|
||||
|
||||
properties = self.json_schema['properties']['credentialSubject']['properties']
|
||||
head_row = {x: '' for x in properties.keys()}
|
||||
for n in range(df.last_valid_index()+1):
|
||||
row = {}
|
||||
row = head_row.copy()
|
||||
for k in data_pd.keys():
|
||||
row[k] = data_pd[k][n] or ''
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
"lang": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#lang",
|
||||
"surnames": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#surnames",
|
||||
"email": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#email",
|
||||
"affiliatedSince": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#affiliatedSince",
|
||||
"affiliatedUntil": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/contexts/vocab#affiliatedUntil",
|
||||
"issued": "https://ec.europa.eu/digital-building-blocks/wikis/display/EBSIDOC/Verifiable+Attestation#issued",
|
||||
"validFrom": "https://ec.europa.eu/digital-building-blocks/wikis/display/EBSIDOC/Verifiable+Attestation#validFrom",
|
||||
"validUntil": "https://ec.europa.eu/digital-building-blocks/wikis/display/EBSIDOC/Verifiable+Attestation#validUntil"
|
||||
|
@ -87,9 +89,11 @@
|
|||
"organisation": "Pangea",
|
||||
"membershipType": "{{ membershipType }}",
|
||||
"membershipId": "{{ vc_id }}",
|
||||
"AffiliatedFrom": "{{ AffiliatedFrom }}",
|
||||
"AffiliatedUntil": "{{ AffiliatedUntil }}",
|
||||
"affiliatedSince": "{{ affiliatedSince }}",
|
||||
"affiliatedUntil": "{{ affiliatedUntil }}",
|
||||
"typeOfPerson": "{{ typeOfPerson }}",
|
||||
"identityDocType": "{{ identityDocType }}",
|
||||
"identityNumber": "{{ identityNumber }}",
|
||||
"name": "{{ first_name }}",
|
||||
"surnames": "{{ last_name }}",
|
||||
"email": "{{ email }}",
|
||||
|
|
|
@ -44,7 +44,10 @@ class RequestCredentialForm(forms.Form):
|
|||
|
||||
did = did[0].did
|
||||
cred = cred[0]
|
||||
try:
|
||||
cred.issue(did)
|
||||
except Exception:
|
||||
return
|
||||
|
||||
if commit:
|
||||
cred.save()
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
"membershipType": {
|
||||
"type": "string"
|
||||
},
|
||||
"AffiliatedFrom": {
|
||||
"affiliatedSince": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"AffiliatedUntil": {
|
||||
"affiliatedUntil": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
|
@ -54,6 +54,7 @@
|
|||
},
|
||||
"required": [
|
||||
"organisation",
|
||||
"affiliatedSince",
|
||||
"typeOfPerson",
|
||||
"name",
|
||||
"surnames",
|
||||
|
|
Loading…
Reference in New Issue