We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 765ec3c commit 0c2a8bfCopy full SHA for 0c2a8bf
app/models/serializers/content_serializer.rb
@@ -113,7 +113,9 @@ def initialize(content)
113
def value_for(attribute_field, content)
114
case attribute_field.field_type
115
when 'link'
116
- page_links = attribute_field.attribute_values.find_by(entity_type: content.class.name, entity_id: content.id)
+ page_links = self.attribute_values.detect do |value|
117
+ value.entity_type == content.class.name && value.entity_id == content.id && value.attribute_field_id == attribute_field.id
118
+ end
119
if page_links.nil?
120
# Fall back on old relation value
121
# We're technically doing a double lookup here (by converting response
0 commit comments