0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Removed subscribed from email recipient filter validity check

- `subscribed` will soon cease to be a column on a member and I get errors
  in tests that stem from this block of code because it no longer exists
- AFAICT this block of code is only used to verify the filter is valid
  to filter on, which we should be able to do even if we remove
  `subscribed`
- this commit removes `subscribed` from the filter
This commit is contained in:
Daniel Lockyer 2022-05-09 15:46:22 +01:00
parent f48a668671
commit fce17d714e
No known key found for this signature in database
GPG key ID: D21186F0B47295AD

View file

@ -69,7 +69,7 @@ class PostsService {
if (emailRecipientFilter !== 'all') {
// check filter is valid
try {
await this.models.Member.findPage({filter: `subscribed:true+${emailRecipientFilter}`, limit: 1});
await this.models.Member.findPage({filter: emailRecipientFilter, limit: 1});
} catch (err) {
return Promise.reject(new BadRequestError({
message: tpl(messages.invalidEmailRecipientFilter),