Fix for tests

This commit is contained in:
Hillel Coren 2018-07-27 16:58:32 +03:00
parent 59b309aed0
commit 5d9392a55b
2 changed files with 3 additions and 5 deletions

View File

@ -46,7 +46,9 @@ class InvoiceRequest extends EntityRequest
if(request()->is('quotes/*') && request()->isMethod('get') && !$this->user()->can('view', ENTITY_QUOTE))
return false;
HistoryUtils::trackViewed($invoice);
if ($invoice) {
HistoryUtils::trackViewed($invoice);
}
return true;
}

View File

@ -106,10 +106,6 @@ class HistoryUtils
public static function trackViewed(EntityModel $entity)
{
if (! $entity) {
return;
}
$entityType = $entity->getEntityType();
$trackedTypes = [
ENTITY_CLIENT,