Skip to content

Commit

Permalink
fix: validate case number on case status update
Browse files Browse the repository at this point in the history
  • Loading branch information
devmiguelangel committed Nov 6, 2024
1 parent 6d3da4d commit 3b59654
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ProcessMaker/Repositories/CaseRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ public function update(ExecutionInstanceInterface $instance, TokenInterface $tok
*/
public function updateStatus(ExecutionInstanceInterface $instance): void
{
if (is_null($instance->case_number)) {
Log::error('case started not found, method=updateStatus, instance=' . $instance->getKey());

return;
}

// If a sub-process is completed, do not update the case started status
if (!is_null($instance->parent_request_id)) {
return;
Expand Down

0 comments on commit 3b59654

Please sign in to comment.