0
Fork 0
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:
Rishabh 2022-05-11 21:38:58 +05:30
parent 9f85f7a4fe
commit 2e8c66d93c

View file

@ -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) {