fix public credential

This commit is contained in:
Cayo Puigdefabregas 2024-02-21 10:16:32 +01:00
parent ee43b7f974
commit 996288460c

View file

@ -35,9 +35,7 @@ from idhub.user.tables import (
CredentialsTable
)
from django.core.cache import cache
from django.conf import settings
from idhub.user.forms import (
ProfileForm,
RequestCredentialForm,
DemandAuthorizationForm,
TermsConditionsForm
@ -367,7 +365,7 @@ class PublicCredentialJsonView(View):
hash=pk,
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")
return response