solo notificar a les usuaries confirmades

This commit is contained in:
f 2020-03-24 14:14:55 -03:00
parent c1d69c6db4
commit bdedaf67cc
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D

View file

@ -45,9 +45,8 @@ class DeployJob < ApplicationJob
end
def notify_usuaries
# TODO: existe site.usuaries_ids?
@site.usuaries.find_each do |usuarie|
DeployMailer.with(usuarie: usuarie.id, site: @site.id)
@site.roles.where(rol: 'usuarie', temporal: false).pluck(:usuaries_id).each do |usuarie|
DeployMailer.with(usuarie: usuarie, site: @site.id)
.deployed(@deployed)
.deliver_now
end