Red Hat Bugzilla – Bug 1473909
Mail notifications not being sent
Last modified: 2017-08-15 16:24:55 EDT
rake reports:daily task fails with following trace
NoMethodError: undefined method `mail_enabled?' for nil:NilClass
/home/ares/Projekty/Zdrojaky/foreman/lib/tasks/reports.rake:97:in `block in process_notifications'
/home/ares/Projekty/Zdrojaky/foreman/lib/tasks/reports.rake:102:in `block (2 levels) in <top (required)>'
Tasks: TOP => reports:daily
(See full trace by running task with --trace)
it's obviously caused by taxonomies, the rake task is not running under admin user so mail notification user can not be found if the user is in any context. I think that's a candidate for 1.15.z since it's a regression caused by #16982
Created from redmine issue http://projects.theforeman.org/issues/20017
Upstream bug assigned to firstname.lastname@example.org
Running foreman-rake reports:daily does not return any error anymore.