diff --git a/src/client/cypress/e2e/editor/waterIngress.cy.js b/src/client/cypress/e2e/editor/waterIngress.cy.js index 658445814..18b0cc450 100644 --- a/src/client/cypress/e2e/editor/waterIngress.cy.js +++ b/src/client/cypress/e2e/editor/waterIngress.cy.js @@ -70,7 +70,6 @@ describe("Tests for the wateringress editor.", () => { cy.wait("@casing_GET"); setSelect("quantityId", 2); - setSelect("conditionsId", 2); setSelect("reliabilityId", 1); setSelect("casingId", 1); setInput("startTime", "2012-11-14T12:06"); @@ -79,15 +78,16 @@ describe("Tests for the wateringress editor.", () => { saveForm(); evaluateDisplayValue("quantity", "viel (> 120 l/min)"); - evaluateDisplayValue("conditions", "frei/ungespannt"); evaluateDisplayValue("reliability", "fraglich"); evaluateDisplayValue("casingName", "casing-1"); // edit wateringress startEditing(); setSelect("quantityId", 1); + setSelect("conditionsId", 3); saveForm(); evaluateDisplayValue("quantity", "mittel (30 - 120 l/min)"); + evaluateDisplayValue("conditions", "frei/ungespannt"); evaluateDisplayValue("casingName", "casing-1"); // delete wateringress diff --git a/src/client/src/commons/form/borehole/hydrogeology/waterIngressInput.js b/src/client/src/commons/form/borehole/hydrogeology/waterIngressInput.js index 6777fe6a8..61d7ab4b6 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/waterIngressInput.js +++ b/src/client/src/commons/form/borehole/hydrogeology/waterIngressInput.js @@ -21,6 +21,9 @@ const WaterIngressInput = props => { if (data.casingId == null) { data.casingId = item.casingId; } + if (data.conditionsId === "") { + data.conditionsId = null; + } return data; }; @@ -53,7 +56,6 @@ const WaterIngressInput = props => { fieldName="conditionsId" label="conditions" selected={item.conditionsId} - required={true} values={domains?.data ?.filter( d =>