diff --git a/app/Models/EntityModel.php b/app/Models/EntityModel.php index 96ebdd2f527d..79175a43d79e 100644 --- a/app/Models/EntityModel.php +++ b/app/Models/EntityModel.php @@ -161,7 +161,7 @@ class EntityModel extends Eloquent $query->where($this->getTable() .'.account_id', '=', $accountId); - if (func_num_args() > 1 && ! $publicId) { + if (func_num_args() > 1 && ! $publicId && ! $accountId) { $query->where('id', '=', 0); return $query; }