Skip to content

Commit

Permalink
Merge pull request #2 from yankinmax/fix-/holidays-set
Browse files Browse the repository at this point in the history
[FIX] hr_holidays_public: provide defaults to process holidays
  • Loading branch information
gurneyalex authored Oct 7, 2022
2 parents 3c58212 + a4d0543 commit ca5a107
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hr_holidays_public/models/resource_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def _attendance_intervals_batch_exclude_public_holidays(
)
attendances = []
country = resource_country.get(resource.id, self.env["res.country"])
holidays = holidays_by_country.get(country)
holidays = holidays_by_country.get(country, set())
for attendance in interval_resource._items:
if holidays and attendance[0].date() not in holidays:
if attendance[0].date() not in holidays:
attendances.append(attendance)
intervals[resource.id] = Intervals(attendances)
return intervals
Expand Down

0 comments on commit ca5a107

Please sign in to comment.