Ver Fonte

Prevent duplicate emails

Andrew Kane há 9 anos atrás
pai
commit
55f6148c23
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      lib/blazer.rb

+ 1 - 1
lib/blazer.rb

@@ -80,7 +80,7 @@ module Blazer
   def self.send_failing_checks
     emails = {}
     Blazer::Check.includes(:blazer_query).where(state: %w[failing error]).find_each do |check|
-      check.emails.to_s.split(",").each do |email|
+      check.emails.to_s.split(",").map(&:strip).each do |email|
         (emails[email] ||= []) << check
       end
     end