Skip to content

Commit

Permalink
[7.x] Only published models should be returned by augmentation (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean authored Dec 9, 2024
1 parent 5c05f1a commit 1c6e350
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Fieldtypes/BaseFieldtype.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ protected function getAugmentableModels(Resource $resource, $values): Collection

return $model;
})
->when($resource->hasPublishStates(), fn ($collection) => $collection->filter(fn ($model) => $model->published()))
->filter();
}

Expand Down

0 comments on commit 1c6e350

Please sign in to comment.