0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

🐛 Fixed error when using API to search for tags

refs a457631a20

- `defaultColumnsToFetch` was moved to the CRUD plugin in the referenced
  commit, which makes it a function on `this` instead of `this.prototype`
- this means the function doesn't exist and Admin throws an error when
  you start typing in the search bar because the API 500s
- this commit switches it to `this.defaultColumnsToFetch()`
This commit is contained in:
Daniel Lockyer 2021-06-24 13:08:05 +01:00
parent 13adff145c
commit 188de00489
No known key found for this signature in database
GPG key ID: D21186F0B47295AD

View file

@ -69,7 +69,7 @@ module.exports = function (Bookshelf) {
// and append default columns to fetch
if (options.columns) {
options.columns = _.intersection(options.columns, this.prototype.permittedAttributes());
options.columns = _.union(options.columns, this.prototype.defaultColumnsToFetch());
options.columns = _.union(options.columns, this.defaultColumnsToFetch());
}
if (options.order) {