lib/slack/smart-bot/utils/check_vacations.rb in slack-smart-bot-1.13.2 vs lib/slack/smart-bot/utils/check_vacations.rb in slack-smart-bot-1.14.0
- old
+ new
@@ -8,9 +8,10 @@
end
on_vacation = []
users.each do |user|
type = nil
expiration = nil
+ @vacations[user].periods ||= []
@vacations[user].periods.each do |p|
if only_first_day and p.from == date.strftime("%Y/%m/%d")
type = p.type
on_vacation << user
expiration = p.to