From 662688b6e9d4d6eb6bab47cdb215e35490221e9c Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 26 Feb 2024 17:26:07 +0100 Subject: [PATCH 1/3] download json only for issued credentials --- idhub/templates/idhub/user/credential.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/idhub/templates/idhub/user/credential.html b/idhub/templates/idhub/user/credential.html index b78e81b..7152049 100644 --- a/idhub/templates/idhub/user/credential.html +++ b/idhub/templates/idhub/user/credential.html @@ -38,7 +38,7 @@ - {% if object.issued_on %} + {% if object.get_status == 'Issued' %}
{% if object.eidas1_did and admin_validated %} {% endif %} + {% if object.get_status == 'Enabled' %} + {% trans 'Request credential' %} + {% endif %}
{% endblock %} From 873aa62878d7e55de6c6636b1ac15f04ddb97d87 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 26 Feb 2024 18:19:18 +0100 Subject: [PATCH 2/3] Download instead of View Json --- idhub/templates/idhub/admin/issue_credentials.html | 2 +- idhub/templates/idhub/user/credential.html | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/idhub/templates/idhub/admin/issue_credentials.html b/idhub/templates/idhub/admin/issue_credentials.html index 51d14ba..216690e 100644 --- a/idhub/templates/idhub/admin/issue_credentials.html +++ b/idhub/templates/idhub/admin/issue_credentials.html @@ -51,7 +51,7 @@ {% if object.issued_on %} {% endif %} diff --git a/idhub/templates/idhub/user/credential.html b/idhub/templates/idhub/user/credential.html index 7152049..ac5c14e 100644 --- a/idhub/templates/idhub/user/credential.html +++ b/idhub/templates/idhub/user/credential.html @@ -46,11 +46,13 @@ {% endif %} {% endif %} {% if object.get_status == 'Enabled' %} + {% endif %} {% endblock %} From 5f9e7ce46d9398daba5e3cc2e1763e38dc622e3a Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 26 Feb 2024 18:20:26 +0100 Subject: [PATCH 3/3] add in credentials values == 0 --- idhub/admin/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idhub/admin/forms.py b/idhub/admin/forms.py index dc6a1da..cefc18b 100644 --- a/idhub/admin/forms.py +++ b/idhub/admin/forms.py @@ -234,7 +234,7 @@ class ImportForm(forms.Form): for n in range(df.last_valid_index()+1): row = {} for k in data_pd.keys(): - if data_pd[k][n]: + if data_pd[k][n] or data_pd[k][n] == 0: row[k] = data_pd[k][n] user = self.validate_jsonld(n, row)