fix type for oidc4vp

This commit is contained in:
Cayo Puigdefabregas 2024-01-21 13:43:29 +01:00
parent 88f8485202
commit 4050892aa9
1 changed files with 3 additions and 1 deletions

View File

@ -891,11 +891,13 @@ class SchemasImportAddView(SchemasMix):
ldata = json.loads(data) ldata = json.loads(data)
assert credtools.validate_schema(ldata) assert credtools.validate_schema(ldata)
name = ldata.get('name') name = ldata.get('name')
title = ldata.get('title')
assert name assert name
assert title
except Exception: except Exception:
messages.error(self.request, _('This is not a valid schema!')) messages.error(self.request, _('This is not a valid schema!'))
return return
schema = Schemas.objects.create(file_schema=file_name, data=data, type=name) schema = Schemas.objects.create(file_schema=file_name, data=data, type=title)
schema.save() schema.save()
return schema return schema