Skip to content

Commit

Permalink
BUGFIX: Unset already committed steps when submitted a second time wi…
Browse files Browse the repository at this point in the history
…th invalid values

Previously already committed steps were only replaces when a new valid state was pushed.
This was unexpected as the user had changed the values and expects the new state to be submitted.
With this change a step is overwritten when submitted again with valid data or removed otherwise.
  • Loading branch information
mficzel committed Dec 10, 2021
1 parent 78afcfe commit 98bfedb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ public function handle(ActionRequest $request, array $data = []): void
$currentSubProcess->getData()
);
} else {
if ($this->state && $resultCommittingIsAllowed && $this->state->hasPart($this->currentSubProcessKey)) {
$this->state->removePart($this->currentSubProcessKey);
}
if ($this->targetSubProcessKey) {
$request->setArgument('__submittedArguments', []);
$request->setArgument('__submittedArgumentValidationResults', new Result());
Expand Down

0 comments on commit 98bfedb

Please sign in to comment.