From e8cc344bd1a3dd4906158b27a1d908e5de1439ef Mon Sep 17 00:00:00 2001 From: Richard McHale Date: Tue, 20 Aug 2024 09:45:00 +0100 Subject: [PATCH] Remove identityCheck from the fixture form #patch (#251) When unpopulated donor.identityCheck and certificateProvider.identityCheck are being sent with blank values. This causes an Unmarshalling error in the API. To allow creation of test data for a demo of paper ID these are temporarily being removed from the fixture form. --- fixtures/static/js/json-schema-editor.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fixtures/static/js/json-schema-editor.mjs b/fixtures/static/js/json-schema-editor.mjs index badaf2ee..341d3dbc 100644 --- a/fixtures/static/js/json-schema-editor.mjs +++ b/fixtures/static/js/json-schema-editor.mjs @@ -51,6 +51,11 @@ export class JsonSchemaEditor { const response = await fetch(url); this.schema = await response.json(); + // TODO - Find a better solution + // HACK - Remove these from the schema so that blank values are not sent to the API + delete this.schema.properties.donor.properties.identityCheck; + delete this.schema.properties.certificateProvider.properties.identityCheck; + const $container = document.createElement("div"); this.$formContainer = $container;