BranchMerger: no remark with empty comment

This commit is contained in:
Thomas Gelf 2022-02-08 08:57:58 +01:00
parent 8bcc20e004
commit bb567946d2

View File

@ -101,11 +101,13 @@ class BranchMerger
$firstActivityId = (int) $this->db->fetchOne(
$this->db->select()->from('director_activity_log', 'MIN(id)')->where('id > ?', $formerActivityId)
);
$this->db->insert('director_activity_log_remark', [
'first_related_activity' => $firstActivityId,
'last_related_activity' => $currentActivityId,
'remark' => $comment,
]);
if ($comment && strlen($comment)) {
$this->db->insert('director_activity_log_remark', [
'first_related_activity' => $firstActivityId,
'last_related_activity' => $currentActivityId,
'remark' => $comment,
]);
}
});
}