mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Added type:post
enforcement when fetching posts for collections
refs https://github.com/TryGhost/Team/issues/3148 - Collections should never ever operate on pages, so limiting them at the fetch stage is the bes possible place, so they don't enter the system when an automatic collection is created.
This commit is contained in:
parent
260ca0548a
commit
1968296410
1 changed files with 2 additions and 1 deletions
|
@ -15,7 +15,8 @@ class CollectionsServiceWrapper {
|
|||
postsRepository: {
|
||||
getAll: async ({filter}) => {
|
||||
return models.Post.findAll({
|
||||
filter
|
||||
// @NOTE: enforce "post" type to avoid ever fetching pages
|
||||
filter: `(${filter})+type:post`
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue