From 476df7f02e166b5ceb133c8029ecffdd96619f7f Mon Sep 17 00:00:00 2001 From: kaioken Date: Thu, 3 Jan 2019 16:59:04 -0400 Subject: [PATCH] bug fix exception --- src/QueryParserCustomFields.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/QueryParserCustomFields.php b/src/QueryParserCustomFields.php index c4702ee..57d6bf6 100755 --- a/src/QueryParserCustomFields.php +++ b/src/QueryParserCustomFields.php @@ -5,6 +5,7 @@ use Baka\Database\CustomFields\CustomFields; use Baka\Database\CustomFields\Modules; use Baka\Database\Model; +use Exception; /** * Base QueryParser. Parse GET request for a API to a array Phalcon Model find and FindFirst can intepret @@ -774,7 +775,7 @@ public static function parseRelationShips(string $relationships, &$results) : ar $newResults = []; - if (!($results instanceof Baka)) { + if (!($results instanceof Model)) { throw new Exception(_('Result needs to be a Baka Model')); }