| 
75 | 75 | import life.qbic.projectmanagement.application.api.AsyncProjectService.ExperimentalGroupUpdateRequest;  | 
76 | 76 | import life.qbic.projectmanagement.application.api.AsyncProjectService.ExperimentalGroupUpdateResponse;  | 
77 | 77 | import life.qbic.projectmanagement.application.api.AsyncProjectService.ExperimentalVariablesCreationRequest;  | 
78 |  | -import life.qbic.projectmanagement.application.api.AsyncProjectService.ExperimentalVariablesUpdateRequest;  | 
 | 78 | +import life.qbic.projectmanagement.application.api.AsyncProjectService.ExperimentalVariablesDeletionRequest;  | 
79 | 79 | import life.qbic.projectmanagement.application.confounding.ConfoundingVariableService;  | 
80 | 80 | import life.qbic.projectmanagement.application.confounding.ConfoundingVariableService.ConfoundingVariableInformation;  | 
81 | 81 | import life.qbic.projectmanagement.application.confounding.ConfoundingVariableService.ExperimentReference;  | 
@@ -584,15 +584,19 @@ private void onExperimentalVariablesEditConfirmed(  | 
584 | 584 |     ExperimentId experimentId = context.experimentId().orElseThrow();  | 
585 | 585 |     var ui = UI.getCurrent();  | 
586 | 586 | 
 
  | 
587 |  | -    ExperimentalVariablesUpdateRequest request = new ExperimentalVariablesUpdateRequest(  | 
 | 587 | +    ExperimentalVariablesDeletionRequest deletionRequest = new ExperimentalVariablesDeletionRequest(  | 
 | 588 | +        projectId.value(),  | 
 | 589 | +        experimentId.value());  | 
 | 590 | + | 
 | 591 | +    ExperimentalVariablesCreationRequest creationRequest = new ExperimentalVariablesCreationRequest(  | 
588 | 592 |         projectId.value(),  | 
589 | 593 |         experimentId.value(), variables);  | 
590 | 594 | 
 
  | 
591 |  | -    asyncProjectService.update(request)  | 
 | 595 | +    asyncProjectService.delete(deletionRequest)  | 
592 | 596 |         .doOnNext(it -> log.debug(  | 
593 | 597 |             "Removed variables for project" + projectId))  | 
594 | 598 |         .flatMap(it ->  | 
595 |  | -            asyncProjectService.update(request))  | 
 | 599 | +            asyncProjectService.create(creationRequest))  | 
596 | 600 |         .doOnNext(it -> ui.access(() -> {  | 
597 | 601 |           confirmEvent.getSource().close();  | 
598 | 602 |           reloadExperimentInfo(projectId,  | 
 | 
0 commit comments