Skip to content

Commit

Permalink
Merge pull request #376 from pimcore/getindex
Browse files Browse the repository at this point in the history
DataObject resolveIndex always results in NULL
  • Loading branch information
weisswurstkanone authored Jun 16, 2021
2 parents da26858 + 17ea0a0 commit 4c79ae3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/GraphQL/Resolver/DataObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Pimcore\Bundle\DataHubBundle\GraphQL\Service;
use Pimcore\Bundle\DataHubBundle\GraphQL\Traits\ElementTagTrait;
use Pimcore\Bundle\DataHubBundle\GraphQL\Traits\ServiceTrait;
use Pimcore\Model\DataObject\AbstractObject;

class DataObject extends Element
{
Expand Down Expand Up @@ -69,7 +70,7 @@ public function resolveIndex($value = null, $args = [], $context = [], ResolveIn

$object = \Pimcore\Model\DataObject::getById($value['id']);

if (!$object instanceof self) {
if (!$object instanceof AbstractObject) {
return null;
}

Expand Down

0 comments on commit 4c79ae3

Please sign in to comment.