From d09f0f94bde306dc06c2a2d3fe5de5495dcf839a Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 18 Mar 2024 17:30:32 +0100 Subject: [PATCH 1/3] clean nans --- idhub/admin/forms.py | 1 + 1 file changed, 1 insertion(+) diff --git a/idhub/admin/forms.py b/idhub/admin/forms.py index a67c77f..0ec7aee 100644 --- a/idhub/admin/forms.py +++ b/idhub/admin/forms.py @@ -248,6 +248,7 @@ class ImportForm(forms.Form): # convert dates to iso 8601 for col in df.select_dtypes(include='datetime').columns: df[col] = df[col].dt.strftime("%Y-%m-%d") + df.fillna('', inplace=True) # convert numbers to strings if this is indicate in schema for col in props.keys(): From bf3d6d85b616c98201221fc26b2ac0980cca9759 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 18 Mar 2024 17:31:16 +0100 Subject: [PATCH 2/3] fix membershipId --- idhub/templates/credentials/membership-card.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idhub/templates/credentials/membership-card.json b/idhub/templates/credentials/membership-card.json index e9de47a..0ded5f5 100644 --- a/idhub/templates/credentials/membership-card.json +++ b/idhub/templates/credentials/membership-card.json @@ -57,7 +57,7 @@ "identityNumber": "{{ identityNumber }}", "organisation": "{{ organisation }}", "membershipType": "{{ membershipType }}", - "membershipId": "{{ vc_id }}", + "membershipId": "{{ membershipId }}", "affiliatedSince": "{{ affiliatedSince }}", "affiliatedUntil": "{{ affiliatedUntil }}" }, From 75356b865bd30182adafc087983e075097abdd7b Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 18 Mar 2024 17:32:11 +0100 Subject: [PATCH 3/3] fix get_status in translate pages --- idhub/templates/idhub/admin/issue_credentials.html | 6 +++--- idhub/templates/idhub/user/credential.html | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/idhub/templates/idhub/admin/issue_credentials.html b/idhub/templates/idhub/admin/issue_credentials.html index f046683..75d9ff7 100644 --- a/idhub/templates/idhub/admin/issue_credentials.html +++ b/idhub/templates/idhub/admin/issue_credentials.html @@ -10,11 +10,11 @@
- {% if object.get_status == 'Issued' %} + {% if object.status == 2 %} {% trans 'Download as JSON' %} {% trans 'Revoke' %} {% endif %} - {% if object.get_status == 'Enabled' %} + {% if object.status == 1 %} {% trans 'Delete' %} {% endif %}
@@ -46,7 +46,7 @@ {% trans 'Status' %}:
- {{ object.get_status}} + {{ object.get_status }}
diff --git a/idhub/templates/idhub/user/credential.html b/idhub/templates/idhub/user/credential.html index 6362a5e..459e539 100644 --- a/idhub/templates/idhub/user/credential.html +++ b/idhub/templates/idhub/user/credential.html @@ -9,7 +9,7 @@ {{ subtitle }} - {% if object.get_status == 'Issued' %} + {% if object.status == 2 %} {% if object.eidas1_did and admin_validated %}
{% trans 'Download as PDF (Catalan)' %} @@ -20,12 +20,12 @@ {% endif %} {% endif %}
- {% if object.get_status == 'Issued' %} + {% if object.status == 2 %} {% if object.eidas1_did and admin_validated %} {% endif %} {% trans 'Download as JSON' %} {% endif %} - {% if object.get_status == 'Enabled' %} + {% if object.status == 1 %} {% trans 'Request credential' %} {% endif %}
@@ -57,7 +57,7 @@ {% trans 'Status' %}:
- {{ object.get_status}} + {{ object.get_status }}