Fix email_addresses bug.

This commit is contained in:
BoHung Chiu 2022-03-17 19:16:15 +08:00
parent 8494f37661
commit 40aa32c15b
1 changed files with 3 additions and 2 deletions

View File

@ -189,8 +189,9 @@ class Bulletin
def email_addresses
addresses = self.email_members.collect{|member| member.email} rescue []
addresses = addresses +[self.other_mailaddress] if !self.other_mailaddress.blank?
addresses.flatten
addresses = addresses +self.other_mailaddress.split(",") if !self.other_mailaddress.blank?
addresses = addresses.flatten.select{|e| e.present?}.map{|e| e.strip}
addresses
end
def email