Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
arif-rh committed Jun 7, 2020
1 parent dbc5655 commit e0dfd2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Models/DynaModelTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ protected function buildRelationship($data)

if (! empty($parentData))
{
if ($this->isSingleResult($data))
if ($this->isSingleResult($parentData))
{
$parentData = [$parentData];
}
Expand Down Expand Up @@ -935,7 +935,7 @@ protected function attachRelationData($resultData, $childData, $fieldAlias, $rel
{
$relationData = array_group_by($childData, $relationId);

$singleRow = $this->isSingleResult($resultData);
$singleRow = $this->isSingleResult($parentData);

if (! $singleRow)
{
Expand Down

0 comments on commit e0dfd2c

Please sign in to comment.