Skip to content

Commit

Permalink
#362 [Triggers] fix: fatal method fetch if no defined
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Jul 25, 2023
1 parent b0e63b9 commit d53e85e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf
$now = dol_now();
$actioncomm = new ActionComm($this->db);

$object->fetch($object->id);
if (method_exists($object, 'fetch')) {
$object->fetch($object->id);
}

$actioncomm->elementtype = $object->element . '@dolimeet';
$actioncomm->type_code = 'AC_OTH_AUTO';
Expand Down

0 comments on commit d53e85e

Please sign in to comment.