diff --git a/app/Models/EntityModel.php b/app/Models/EntityModel.php index 05cf083bc..618987b8c 100644 --- a/app/Models/EntityModel.php +++ b/app/Models/EntityModel.php @@ -154,7 +154,7 @@ class EntityModel extends Eloquent } } - if (Auth::check() && ! Auth::user()->hasPermission('view_all') && $this->getEntityType() != ENTITY_TAX_RATE) { + if (Auth::check() && ! Auth::user()->hasPermission('view_all') && method_exists($this, 'getEntityType') && $this->getEntityType() != ENTITY_TAX_RATE) { $query->where(Utils::pluralizeEntityType($this->getEntityType()) . '.user_id', '=', Auth::user()->id); }