Skip to content

Commit a7ba90d

Browse files
authored
🐛 Fixed filtering of page attribute when fields query param is used (#10352)
closes #10351 - Updated filtering logic for `page` in output serialisers of post/page in v2
1 parent aa49f77 commit a7ba90d

File tree

1 file changed

+7
-0
lines changed
  • core/server/api/v2/utils/serializers/output/utils

1 file changed

+7
-0
lines changed

core/server/api/v2/utils/serializers/output/utils/mapper.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ const mapPost = (model, frame) => {
6060
});
6161
}
6262

63+
/**
64+
* Remove extra data attributes passed for filtering when used with columns/fields as bookshelf doesn't filter it out
65+
*/
66+
if (frame.options.columns && frame.options.columns.indexOf('page') < 0) {
67+
delete jsonModel.page;
68+
}
69+
6370
return jsonModel;
6471
};
6572

0 commit comments

Comments
 (0)