fix public credential

This commit is contained in:
Cayo Puigdefabregas 2024-02-21 10:16:32 +01:00
parent ee43b7f974
commit 996288460c
1 changed files with 1 additions and 3 deletions

View File

@ -35,9 +35,7 @@ from idhub.user.tables import (
CredentialsTable CredentialsTable
) )
from django.core.cache import cache from django.core.cache import cache
from django.conf import settings
from idhub.user.forms import ( from idhub.user.forms import (
ProfileForm,
RequestCredentialForm, RequestCredentialForm,
DemandAuthorizationForm, DemandAuthorizationForm,
TermsConditionsForm TermsConditionsForm
@ -367,7 +365,7 @@ class PublicCredentialJsonView(View):
hash=pk, hash=pk,
eidas1_did__isnull=False, eidas1_did__isnull=False,
) )
response = HttpResponse(self.object.data, content_type="application/json") response = HttpResponse(self.object.get_data(), content_type="application/json")
response['Content-Disposition'] = 'attachment; filename={}'.format("credential.json") response['Content-Disposition'] = 'attachment; filename={}'.format("credential.json")
return response return response