From b7e29eebe5bdf4aa2c7b888ae486d00423a7d227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 23 May 2016 21:42:07 +0200 Subject: [PATCH] hide bounces in rejected email logs --- app/models/incoming_email.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/incoming_email.rb b/app/models/incoming_email.rb index 416cc3afc5b..1266d665e2f 100644 --- a/app/models/incoming_email.rb +++ b/app/models/incoming_email.rb @@ -3,7 +3,7 @@ class IncomingEmail < ActiveRecord::Base belongs_to :topic belongs_to :post - scope :errored, -> { where.not(error: nil) } + scope :errored, -> { where("NOT is_bounce AND LENGTH(COALESCE(error,'')) > 0") } end # == Schema Information