Merge branch 'release' into features/132-navegabilidad-credenciales

This commit is contained in:
Cayo Puigdefabregas 2024-02-26 18:10:29 +01:00
commit 9fc7816f86
2 changed files with 3 additions and 9 deletions

View File

@ -225,7 +225,7 @@ class ImportForm(forms.Form):
data_pd = df.fillna('').to_dict() data_pd = df.fillna('').to_dict()
if not data_pd or not df.last_valid_index(): if not data_pd or df.last_valid_index() is None:
self.exception("The file you try to import is empty!") self.exception("The file you try to import is empty!")
if not self._schema: if not self._schema:
@ -234,7 +234,8 @@ class ImportForm(forms.Form):
for n in range(df.last_valid_index()+1): for n in range(df.last_valid_index()+1):
row = {} row = {}
for k in data_pd.keys(): for k in data_pd.keys():
row[k] = data_pd[k][n] or '' if data_pd[k][n]:
row[k] = data_pd[k][n]
user = self.validate_jsonld(n, row) user = self.validate_jsonld(n, row)
self.rows[user] = row self.rows[user] = row
@ -400,7 +401,6 @@ class ImportCertificateForm(forms.Form):
self._did = None self._did = None
self._s = None self._s = None
self._label = None self._label = None
self.user = kwargs.pop('user', None)
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
def clean(self): def clean(self):
@ -433,7 +433,6 @@ class ImportCertificateForm(forms.Form):
did=self.file_name, did=self.file_name,
label=self._label, label=self._label,
eidas1=True, eidas1=True,
user=self.user,
type=DID.Types.KEY type=DID.Types.KEY
) )

View File

@ -840,11 +840,6 @@ class WalletConfigIssuesView(Credentials, FormView):
form_class = ImportCertificateForm form_class = ImportCertificateForm
success_url = reverse_lazy('idhub:admin_dids') success_url = reverse_lazy('idhub:admin_dids')
def get_form_kwargs(self):
kwargs = super().get_form_kwargs()
kwargs['user'] = self.request.user
return kwargs
def form_valid(self, form): def form_valid(self, form):
cred = form.save() cred = form.save()
if cred: if cred: