Skip to content

Commit c472d63

Browse files
Merge pull request #24467 from opf/fix-custom-fields
Fix custom fields MCP tool
2 parents cf80099 + b0d51e6 commit c472d63

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

app/services/mcp_tools/search_custom_fields.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ class SearchCustomFields < Base
5656

5757
def call(page: nil, **filters)
5858
custom_fields = apply_filters(CustomField.visible, filters)
59-
custom_fields = apply_pagination(custom_fields, page)
59+
custom_fields, total = apply_pagination(custom_fields, page)
6060

6161
{
6262
items: custom_fields.map do |custom_field|
6363
::API::V3::CustomFields::CustomFieldRepresenter.create(custom_field, current_user:)
64-
end
64+
end,
65+
total:
6566
}
6667
end
6768
end

0 commit comments

Comments
 (0)