Skip to content

Commit

Permalink
Merge pull request #14 from bakaphp/feature-queryparser-customfields-…
Browse files Browse the repository at this point in the history
…relationships

 bug fix exception
  • Loading branch information
kaioken authored Jan 3, 2019
2 parents 164bff5 + 476df7f commit d771f2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/QueryParserCustomFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'));
}

Expand Down

0 comments on commit d771f2b

Please sign in to comment.