Skip to content

Commit

Permalink
Fix relationship support for non-grid fieldtypes using grid columns
Browse files Browse the repository at this point in the history
  • Loading branch information
bryannielsen committed Sep 26, 2024
1 parent 36bacfe commit 6585b6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Fixed

- Return value for Fluid Field when there are no children
- Relationship Fieldtype support for non-grid fieldtypes that reference grid columns

## [1.4.1] - 2024-09-23

Expand Down
2 changes: 1 addition & 1 deletion src/Fieldtypes/Presenters/Traits/QueriesRelationships.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ trait QueriesRelationships
{
public function buildRelationshipQuery(FieldContent $content, Model $model, $tableName = null)
{
$isGrid = $content->field->field_type === 'grid';
$isGrid = $content->field->field_type === 'grid' || ! empty($content->grid_row_id ?? 0);
$isFluid = $content->hasAttribute('fluid_field');
$fluidFieldId = ($isFluid) ? $content->fluid_field_data_id : 0;

Expand Down

0 comments on commit 6585b6f

Please sign in to comment.