theforeman / foreman_expire_hosts

Foreman plugin for limiting host lifetime
GNU General Public License v3.0
5 stars 12 forks source link

additional_recipients get mail notification with empty host list #29

Closed timogoebel closed 5 years ago

timogoebel commented 5 years ago

This method needs a guard (e.g. return true if hosts.empty?) to check if the hosts array is not empty.

https://github.com/theforeman/foreman_expire_hosts/blob/da5cf8bfa82be0751614071f6288f580359bec7d/app/services/foreman_expire_hosts/notification/base.rb#L26-L34