From 59b309aed0283daf9fabd192bc313c4559aa2d42 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 27 Jul 2018 16:37:00 +0300 Subject: [PATCH] Fix for tests --- app/Libraries/HistoryUtils.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Libraries/HistoryUtils.php b/app/Libraries/HistoryUtils.php index a9e6c68e9602..e4d907891ce0 100644 --- a/app/Libraries/HistoryUtils.php +++ b/app/Libraries/HistoryUtils.php @@ -106,6 +106,10 @@ class HistoryUtils public static function trackViewed(EntityModel $entity) { + if (! $entity) { + return; + } + $entityType = $entity->getEntityType(); $trackedTypes = [ ENTITY_CLIENT,