Fixed bad key lookup in FlexRelatedDirectoryTrait::getCollectionByProperty()

This commit is contained in:
Matias Griese 2021-12-07 12:47:09 +02:00
parent 1c148ab6fb
commit b2cfc4ef5f
2 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,8 @@
* Upgraded to **composer v2.1.14** for PHP 8.1 compatibility
* Added third `$name` parameter to `Blueprint::flattenData()` method, useful for flattening repeating data
* `ControllerResponseTrait`: Redirect response should be json if the extension is .json
3. [](#bugfix)
* Fixed bad key lookup in `FlexRelatedDirectoryTrait::getCollectionByProperty()`
# v1.7.25
## 11/16/2021

View File

@ -36,7 +36,7 @@ trait FlexRelatedDirectoryTrait
/** @var FlexCollection $collection */
$collection = $collection->filter(static function ($object) use ($list) {
return in_array($object->id, $list, true);
return in_array($object->getKey(), $list, true);
});
return $collection;