Skip to content

Commit

Permalink
Refs #36351 - Fix wrong subject
Browse files Browse the repository at this point in the history
  • Loading branch information
ofedoren authored and adamruzicka committed Jun 21, 2023
1 parent 03ce25b commit 018adf9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/lib/actions/check_long_running_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def plan
notification = ::ForemanTasks::TasksMailNotification.find_by(name: "long_running_tasks")
org_admin_role = Role.find_by(name: 'Organization admin')
users = User.left_joins(:roles)
.where(id: UserMailNotification.where(mail_notification_id: notification.id).select(:host_id))
.where(id: UserMailNotification.where(mail_notification_id: notification.id).select(:role_id))
.or(User.where(admin: true))
.or(User.where(id: UserRole.where(id: [org_admin_role.id] + org_admin_role.cloned_role_ids).select(:owner_id)))

Expand Down
2 changes: 1 addition & 1 deletion app/lib/actions/deliver_long_running_tasks_notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def run
tasks = ForemanTasks::Task.where(id: report.task_uuids)
report.user = User.current
report.tasks = tasks
::UINotifications::Tasks::TasksRunningLong.new.deliver!
::UINotifications::Tasks::TasksRunningLong.new(report).deliver!
TasksMailer.long_tasks(report).deliver_now
end

Expand Down

0 comments on commit 018adf9

Please sign in to comment.