Skip to content

Commit 6585b6f

Browse files
committed
Fix relationship support for non-grid fieldtypes using grid columns
1 parent 36bacfe commit 6585b6f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Fixed
66

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

910
## [1.4.1] - 2024-09-23
1011

src/Fieldtypes/Presenters/Traits/QueriesRelationships.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ trait QueriesRelationships
1010
{
1111
public function buildRelationshipQuery(FieldContent $content, Model $model, $tableName = null)
1212
{
13-
$isGrid = $content->field->field_type === 'grid';
13+
$isGrid = $content->field->field_type === 'grid' || ! empty($content->grid_row_id ?? 0);
1414
$isFluid = $content->hasAttribute('fluid_field');
1515
$fluidFieldId = ($isFluid) ? $content->fluid_field_data_id : 0;
1616

0 commit comments

Comments
 (0)