app/queries/decidim/admin/newsletter_recipients.rb in decidim-admin-0.24.3 vs app/queries/decidim/admin/newsletter_recipients.rb in decidim-admin-0.25.0.rc1
- old
+ new
@@ -19,10 +19,12 @@
@form = form
end
def query
recipients = Decidim::User.where(organization: @form.current_organization)
- .where.not(newsletter_notifications_at: nil, email: nil, confirmed_at: nil)
+ .where.not(newsletter_notifications_at: nil)
+ .where.not(email: nil)
+ .where.not(confirmed_at: nil)
.not_deleted
recipients = recipients.interested_in_scopes(@form.scope_ids) if @form.scope_ids.present?
followers = recipients.where(id: user_id_of_followers) if @form.send_to_followers