mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Cleaned enforced filter logic for newsletters model
- removes ambiguity from the logic
This commit is contained in:
parent
9f85f7a4fe
commit
2e8c66d93c
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ const Newsletter = ghostBookshelf.Model.extend({
|
|||
|
||||
// Force active newsletters for content API
|
||||
enforcedFilters: function enforcedFilters(options) {
|
||||
return options.context && options.context.public ? 'status:active' : null;
|
||||
return (options.context && options.context.public) ? 'status:active' : null;
|
||||
},
|
||||
|
||||
async onSaving(model, _attr, options) {
|
||||
|
|
Loading…
Add table
Reference in a new issue