Skip to content

Commit

Permalink
Merge pull request #308 from H2-invent/hotfix/fix-remove-approval
Browse files Browse the repository at this point in the history
Update ApproveService.php
  • Loading branch information
holema authored Feb 21, 2025
2 parents 27c638b + 68a3f41 commit 068fa1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Service/ApproveService.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ public function approve($data, User $user): array
if ($data->getApproved() === true) {
$newdata = clone $data;
$data->setActiv(false);
$newdata->setPrevious($data);
if(method_exists($newdata, 'setPrevious')) {
$newdata->setPrevious($data);
}
$newdata->setApproved(false);
$newdata->setApprovedBy(null);
$this->em->persist($newdata);
Expand Down

0 comments on commit 068fa1c

Please sign in to comment.